r/programming • • Mar 27 '23

Twitter Source Code Leaked on GitHub

https://www.cyberkendra.com/2023/03/twitter-source-code-leaked-on-github.html
8.0k Upvotes

717 comments sorted by

View all comments

Show parent comments

110

u/ghostinthekernel Mar 27 '23

I think the issue is when you fork that code, or does simply using a library package entail you have to open source the project you use it into? Genuine question.

253

u/will_work_for_twerk Mar 27 '23

Either could apply depending on the license used

117

u/plaid_rabbit Mar 27 '23

Depends on the license. IANAL. It varies by the license. MIT requires no sharing. I know there’s some FOSS licenses that require you to share any modifications if you allow users to connect publicly to your app. Most only require you to share if you directly modify the library and distribute it.

→ More replies (3)

24

u/danhakimi Mar 27 '23

It depends on a whole lot more than what the others mentioned. What's the license? Is the code in question being distributed or not? How does the code interact with the package--static link, dynamic link, scripting language import, what? Is the code being modified?

I am a lawyer. I am not your lawyer, and none of this is legal advice. I've worked in this field for years, and it's fairly complicated.

10

u/henk53 Mar 27 '23

Is the code in question being distributed or not?

Many people here seem to overlook this basic question.

7

u/danhakimi Mar 27 '23

Or misunderstand it. Twitter.com distributes a lot. HTML, CSS, JavaScript.

2

u/henk53 Mar 27 '23

Another good point.

Though technically speaking most code that's being distributed that way is in source, and so already visible. It may be compacted, but I assume not explicitly obscured.

So static HTML, CSS and JavaScript that leaks on GitHub (or anywhere else) is different from say Java code that only ever runs on the server and nobody outside Twitter has seen in any form.

→ More replies (4)

56

u/vanatteveldt Mar 27 '23

The answer is somewhat complicated and might depend on the license of the library package and the definition of 'derived work'. My 2 cents (IANAL):

- If the library or package is licensed LGPL, MIT or another non-copyleft license (i.e., not GPL), there should be no problem

- If you're linking to a GPL'd library (i.e. importing it), the situation is more complicated, see e.g. https://en.wikipedia.org/wiki/GPL_linking_exception and its sources

44

u/chx_ Mar 27 '23

IANAL but the GPL does not restrict your rights when using it, it applies if you try to distribute your code.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.

They needed to make the AGPL so people who use the software over a network will be able to get the source code for it.

33

u/jarfil Mar 27 '23 edited Oct 22 '23

CENSORED

51

u/LookIPickedAUsername Mar 27 '23

To be pedantic, the GPL doesn’t restrict your rights at all - it offers you rights you wouldn’t normally have when interacting with someone else’s software.

18

u/[deleted] Mar 27 '23

No idea why this was downvoted. You're absolutely right. The *default* is no rights at all. The licenses add, they don't subtract.

-4

u/WolfGangSen Mar 27 '23 edited Mar 27 '23

Depends on whose point of view you look at it with.

As the developer of the software the licence restricts, without it, you could do whatever you want, share source or not.

With the licence, those options are restricted, (either now you must / mustn't, depending on the licence). (excepting of course if you are just setting the license for software you wholly developed, then the licence isn't really adding or restricting you, you are deciding to restrict people that make further use of your code)

As a user of the software, you are right, GPL does add rights.

Edit: I forgot copyright is a thing... as /u/DigitalPoet_ pointed out below... and without copyright laws licences are meaningless/unnecessary so yeh... this whole comment was pretty dumb.

12

u/[deleted] Mar 27 '23

No. Without a license, the rights to reproduce (which, in software you have to do to use it as a library) stand with the copyright holder alone. A license grants some of those rights, held by the copyright holder, to a wider audience.

→ More replies (1)
→ More replies (2)

10

u/myringotomy Mar 27 '23
  • If the library or package is licensed LGPL, MIT or another non-copyleft license (i.e., not GPL), there should be no problem

There might be. Some of those licenses require attribution.

11

u/vanatteveldt Mar 27 '23

Sure, but you can attribute without making your own code open source

5

u/myringotomy Mar 27 '23

The question is whether they properly attributed or not.

5

u/double-you Mar 27 '23

Do you even attribute?! Do you?!

→ More replies (1)
→ More replies (2)

7

u/Unable-Fox-312 Mar 27 '23

You are supposed to know the license terms for all software you incorporate into your project

1

u/ksknksk Mar 27 '23

Have you actually read the license? Genuine question

→ More replies (8)