1

Let's say I have a GPL web app. Somebody forks it, adds some back end changes and hosts it. In theory, the person installing it is the user so they need the modified source code, not the people signing up to the web page. But what happens to the JS?

Basically if I as a user log into to a web page, I download the JS which is under the GPL and then I execute it in the browser. That makes me a user, right? As a user, I have the right to the full source code, not just the JS.

Why does the downloading of JS count as 'interaction over the network' and not as 'distributing the source code'?

Edit: this is what makes me think it's not distribution https://meta.discourse.org/t/a-question-on-gpl-licensing-and-the-current-wordpress-debacle/3355/11

10
  • 2
    It does. What makes you think it doesn't? May 19, 2021 at 10:28
  • The existence of the AGPL license.
    – ddreian
    May 19, 2021 at 11:04
  • 2
    The primary purpose of the AGPL was nothing to do with JavaScript; it was to deal with the SaaS issue. May 19, 2021 at 11:17
  • 1
    Well Ruby in the case of Discourse, but yes, exactly. May 19, 2021 at 11:22
  • 2
    @ddreian You could try to make that argument, but most people would see it as two apps - a server and a client. Indeed you could write your own frontend to Discourse, using the API (many people have before.) May 19, 2021 at 22:03

1 Answer 1

5

Discourse is a web application, GPLv2+-licensed, containing JavaScript elements which are downloaded by clients onto their browsers. It seems to me that this absolutely is distribution, and that you are therefore entitled to reuse this JS code under GPLv2+. What you're not entitled to is a copy of the code for the server-side application, for this isn't distributed (hence, as you note, the existence of the AGPL).

The GPL only entitles recipients of binary code to GPL'ed access to the source corresponding to the binaries that they have received. In this case, the code downloaded is javascript (JS), which may already be source code. If it's minified JS, there is an argument that you're entitled to the unminified source ("the preferred form of the work for making modifications to it", as GPLv2 s3 has it). You are not, however, entitled to the source for binaries which have not been distributed to you.

Edit: you ask about GPLv3 s5c. This section says that anything distributed to you must be under GPLv3; it doesn't say that anything, in particular, has to be distributed to you.

GPL doesn't say that code received under it, and works based thereon, must be distributed. It only says that when they are, they must come with usable source that corresponds to the binary distributed, and that this source must be under GPL. The problem that then arises with SaaS is exactly why the AGPL was invented. If the GPL worked as you wish it to, there would have been no need for the AGPL.

2
  • But what about GPLv3 in case the web app is coverred by this? For GPLv3 s5c I have the right to the whole work. That should include the back end, right? The app does not work if I just run JS.
    – ddreian
    May 19, 2021 at 12:19
  • @ddreian see my edit above.
    – MadHatter
    May 19, 2021 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.