News for hackers. Stuff that matters.
Re:Use native context menus on Mac OS by lloydatkinson on Tuesday May 25, 2021 @04:51AM (#27274507)
1000% this. The lodash library for Javascript had the authoritarian dictatorship extreme version of this for the longest time.

Any issue was immediately closed and only closed issues would be reopened if enough people gave said closed issue enough thumbs up (and "enough" wasn't even defined). And of course, this process wasn't explained anywhere except in replies to closed issues.

The obvious problem with this was that no issues were ever acted upon ever because no one ever looked at closed issues, because why would they?

I had created a proposal for a new function to be added that was and still is sorely missing. After it was closed and a long discussion ensued between many devs, I gave up and a year later I simply replied that I retract the proposal due to the ridiculous policy of actively being hostile to users. The maintainer deleted the whole issue and along with it all proof of their hostility and hypocrisy.

It was then that I decided I would boycott lodash and simply use better libraries in my projects now like Ramda, which is actually OSS. Looks like lodash is now no longer maintained and has hundreds of tickets open after the hostile maintainer (and it's not hard to guess who from looking at the commit counts) appears to have stopped maintaining it.

Funny how that works, closing tickets constantly ensures no one will want to help, and then the maintainers feel overwhelmed because they are doing it alone.

Basically closing issues is an awful practice that helps no one, as you say.

Re:Use native context menus on Mac OS by Rompect on Tuesday May 25, 2021 @10:02AM (#27276859)
I never understood how people used lodash. Basically every function can be copied and just inserted into ones own codebase and you have one less dependency, which is very pleasant. And they are all so simple that there will never be a problem.
Re:Use native context menus on Mac OS by meetups323 on Tuesday May 25, 2021 @12:46PM (#27279146)
> And they are all so simple that there will never be a problem.

"Simple JS can't have unexpected security/performance pitfalls".

Hah.

https://www.cvedetails.com/vulnerability-list.php?vendor_id=...

Re:Use native context menus on Mac OS by no_wizard on Tuesday May 25, 2021 @02:33PM (#27280491)
Disclaimer: I am not a security expert! This is my layman's attempt at mentioning a common vulnerability too many programs have but not enough knowledge is spread about it. It's easy enough to mitigate in most apps but I don't think most do.

I know this isn't directly related, however one of the vulnerabilities is prototype pollution [0], a deceptively simple technique that I think so many apps are vulnerable to. It goes like the following:

- Get an application to serialize or take `__proto__`, `constructor` or `prototype` as an input so it's a key on a JS Object

- Serialize its value to something nasty, like `'{"auth": {"name": "user", "password": "pwd"}, "message": { "text": "", "__proto__": {"canDelete": true}}}'` [1]

This high jacks the prototype of the object and adding those specified properties. If you do things like deep merging of objects on data, you are susceptible to this without the proper guards in hydration / rehydration. The mitigation is simple: don't allow objects to have `constructor`, `prototype`, or `__proto__`. You can delete them by customizing JSON.parse (by passing a reviver [2]) or using something like `mergeWith` to skip these keys

A similar vulnerability exists with `constructor` and `prototype` as well [3]

[0]: https://portswigger.net/daily-swig/prototype-pollution-the-d...

[1]: https://github.com/Kirill89/prototype-pollution-explained

[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[3]: https://shieldfy.io/security-wiki/prototype-pollution/introd...

Re:Use native context menus on Mac OS by unilynx on Tuesday May 25, 2021 @06:10PM (#27283368)
What's the security risk?

A prototype can only be modified by code that is actually being run. If you can get someone else's application to run code under your control, you've already won.

Re:Use native context menus on Mac OS by meetups323 on Thursday May 27, 2021 @01:37PM (#27305786)
The security risk is you accept a JSON object from an API, that object gets merged with some set of defaults, oops turns out that object was specifically crafted to override the global __proto__ with some way of escalating privileges ({__proto__: {_isAdmin: true}}) and now you're owned.

It requires some knowledge of the inner workings of the system (in the above, you'd have to know that the auth provider checks for a cached `isAdmin` prop on some object before executing the authentication routine to generate it). But if your system is designed to only be secure if no-one knows the inner workings, you're probably owned anyways.

Re:Use native context menus on Mac OS by Qub3d on Tuesday May 25, 2021 @09:38AM (#27276592)
Also known as the "Cascade of Attention Deficit Teenagers" (CADT) development model:

https://archive.is/l4svG (jwz link, so archive.is)

Re:Use native context menus on Mac OS by goldenkey on Tuesday May 25, 2021 @05:19AM (#27274680)
Don't forget that Lodash was basically JDalton's rip of Underscore.js. There used to be a mention of it, since the selling point was benchmarks. Now, I don't see any mention of Underscore...
Re:Use native context menus on Mac OS by hinkley on Tuesday May 25, 2021 @05:28PM (#27282926)
How is underscore these days?

Lodash as an npm module is out of control, file-size wise, and I'm not sure I'm really getting anything for it, other than once a year having to make sure we don't have ten copies of it that can't be deduped (Currently it's occupying 29MB of disk space on my production machines)

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @05:45AM (#27274840)
Not sure I'd call it a "rip", "ripping" for me is associated with "ripping media" which is copying video/music/data from CDs to local hardware. Lodash is more of a re-implementation of a MIT library, not something that should be shameful.

As I remember it, Lodash biggest difference was its modular approach also, not all about performance. Lodash also addressed some inconsistencies in Underscore.js.

Re:Use native context menus on Mac OS by dorian-graph on Tuesday May 25, 2021 @06:36AM (#27275187)
> "ripping" for me is associated with "ripping media" which is copying video/music/data from CDs to local hardware

For many others, the OP's use is common and correct—in a lot of areas.

"They ripped me off" is very prevalent in English speaking countries too, outside of tech.

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @06:44AM (#27275231)
Yeah, that's my understanding as well, from "ripped me off", implying stealing or something negative.

Having the (almost) same API surface as another MIT library is hardly a "ripoff" but a re-implementation.

Edit: since new evidence has come forward (https://news.ycombinator.com/item?id=27275379) I think we can all agree that Lodash is a fork of Underscore.js, nothing more and nothing else.

Re:Use native context menus on Mac OS by cowsandmilk on Tuesday May 25, 2021 @07:09AM (#27275379)
Really, lodash was a fork of underscore, not a reimplementation. The git history shows it.

https://github.com/lodash/lodash/commits/0.1.0?after=e0971cd...

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @07:40AM (#27275613)
Perfect, even better! Now we can all correct ourselves and call it a fork, which sounds much nicer than "rip", "ripoff" or "clone".
Re:Use native context menus on Mac OS by goldenkey on Tuesday May 25, 2021 @10:35AM (#27277317)
Most forks mention their origins somewhere in their bio. I'd still call it a rip considering no credit is being given at all. Why should I need to dig into the Git history to find out the creative origin of Lodash?
Re:Use native context menus on Mac OS by Karunamon on Tuesday May 25, 2021 @04:44PM (#27282383)
The license file reads: Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>

If they were giving "no credit at all", they would be in violation of the MIT license.

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @04:43PM (#27282375)
> Most forks mention their origins somewhere in their bio

Ok, does that make forks who don't mention where they forked from rips? Huge leap in logic.

> Why should I need to dig into the Git history to find out the creative origin of Lodash?

Well, if you're interested in the origin you either look for information available in threads like this, where other people dig or you dig yourself. Not sure what the problem is. Someone published a library under MIT, another person forked that library and created a new one, also under MIT, and somehow the fork is now a rip? Give me a break

Re:Use native context menus on Mac OS by design-material on Tuesday May 25, 2021 @03:59PM (#27281836)
More accurate is 'stolen code without proper attribution'
Re:Use native context menus on Mac OS by Karunamon on Tuesday May 25, 2021 @04:43PM (#27282371)
https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/...

> Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>

They've given precisely as much attribution as is required.

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @04:42PM (#27282362)
Hope you don't publish any MIT code and then blame people when they fork it. That'd be really against the spirit of the MIT license.
Re:Use native context menus on Mac OS by goldenkey on Tuesday May 25, 2021 @06:13AM (#27275019)
Allowed or legal doesn't imply couth. As far as I can tell, Lodash no longer mentions Underscore anywhere. This seems wrong..as if one wants to look more original than one actually is.

I have no qualms with forks or reimplementations (ie. Android - Java.) I actively support the paradigm.

But in this case, it's pretty shitty to try to erase all evidence of said inspiration. Most forks and reimplementations don't do that. They pay homage to their origin with at least a shout out.

Re:Use native context menus on Mac OS by capableweb on Tuesday May 25, 2021 @06:48AM (#27275253)
I don't think Lodash ever "credited" Underscore.js for it's origin. Lodash used to have a "compat" version that promised to work the same as Underscore.js but with better performance, but I think that's about it.

After some digging, it seems like the Lodash website stopped mentioning Underscore.js around 2015 sometime, but even before that, it never had "evidence of said inspiration" as claimed by you.

Here are the versions I looked at:

- https://web.archive.org/web/20120826202523/http://lodash.com...

- https://web.archive.org/web/20130502014523/http://lodash.com...

- https://web.archive.org/web/20140517192947/http://lodash.com...

- https://web.archive.org/web/20150513014815/https://lodash.co...

- https://web.archive.org/web/20160803063412/https://lodash.co...

- https://web.archive.org/web/20170830163720/https://lodash.co...

- https://web.archive.org/web/20180703043557/https://lodash.co...

- https://web.archive.org/web/20190803030353/https://lodash.co...

- https://web.archive.org/web/20200615092636/http://lodash.com...

- https://web.archive.org/web/20210314233141/https://lodash.co...

Re:Use native context menus on Mac OS by goldenkey on Tuesday May 25, 2021 @10:30AM (#27277247)
Good digging. The 2012 banner is

    > A drop-in replacement\* for Underscore.js
I'd consider this to be an admission of where the API came from.

You are right though, my memory failed me. No mention of forking.. Shameless!

Re:Use native context menus on Mac OS by DonHopkins on Tuesday May 25, 2021 @07:58AM (#27275764)
"Rip-Off Menu" is another term of art for "Tear-Off Menu". ;)

Inside Macintosh > Macintosh Human Interface Guidelines > Part 2 - The Interface Elements > Chapter 4 - Menus > Tear-Off Menus and Palettes

http://mirror.informatimago.com/next/developer.apple.com/doc...

http://mirror.informatimago.com/next/developer.apple.com/doc...

>A tear-off menu allows users to move a menu around the screen like a window. Tear-off menus save desktop space because the user can place them on top of a document or move them to a convenient position. If you implement a tear-off menu rather than a fixed palette in a window, you allow the user to have a larger workspace in document windows. Users can also choose to leave the menu in the menu bar, or tear it off and close it when necessary. Tear-off menus give the user more flexibility than fixed palettes do.

Re:Use native context menus on Mac OS by theta_d on Tuesday May 25, 2021 @06:13AM (#27275021)
Rip short for rip off which can mean a clone essentially.
Re:Use native context menus on Mac OS by achempion on Tuesday May 25, 2021 @09:27AM (#27276504)
You could try to look on in from another perspective.

The library is free and worked on by maintainers in a spare time from main duties (not talking here about lodash specifically).

Maintainers don't own you any support nor obliged to work the way you may think they should.

I would say that it's great that we have many tools and should give more respect to maintainers which basically save you a ton of resources and maximum they ask for is to follow the established processes.

Re:Use native context menus on Mac OS by NetOpWibby on Tuesday May 25, 2021 @11:02AM (#27277727)
You haven’t addressed the hostile attitude of the maintainer, which was the point.
Re:Use native context menus on Mac OS by a1369209993 on Tuesday May 25, 2021 @04:03PM (#27281876)
The hostile and deceptive attitude of the maintainer. If they honestly admitted that they didn't give a crap about bug reports, or even just didn't bother setting up any system for recieving them, that would disappointing, but achempion's comment would cover the situation nicely. The problem (assuming the previously stated facts are accurate) is they actively set up a system to solicit and recieve bug reports, and then systematically sabotaged and neglected that system when people tried to actually report bugs.
Re:Use native context menus on Mac OS by hinkley on Tuesday May 25, 2021 @05:30PM (#27282934)
I feel like we could have the same conversation about the Docker folks and so this feels more like a popularity contest than an objective conversation.
Re:Use native context menus on Mac OS by CRConrad on Thursday May 27, 2021 @03:31PM (#27307134)
It's not as if "Person or group B are also objectively arseholes!" logically invalidates "Person or group A are objectively arseholes", is it?