I'm planning a new project that will require a great deal of custom code that must remain proprietary to my client. I found the licensing FAQ http://drupal.org/licensing/faq to be unclear. I know this is primarily a coder as opposed to legal Q&A forum, but hopefully some experienced Drupal developers can shed more light on this issue.

  1. What constitutes distribution? For example, if the code is used on two unique domains owned by the same client, is that considered distribution? Page 533, Chapter 24 of The Definitive Guide to Drupal 7 states "Modules built for ourselves or a single client are not considered distributed", but that isn't very clear.

  2. If a module has been distributed and you have a copy, are you obligated to give me a copy, or is it up to you? (In other words, could I demand a copy from you?)

  3. If custom javascript is called from a Drupal javascript object (such as Drupal.behaviors), is it considered GPL'd and distributed? The licensing FAQ Answer #7 states "Drupal's JavaScript, including the copy of jQuery that is included with Drupal, is itself under the GPL as well, so any Javascript that interacts with Drupal's JavaScript in the browser must also be under the GPL or a GPL compatible license." That's a major non-starter for this particular project. The client obviously doesn't want competitors walking off with highly specialized javascript that took months to develop with no legal recourse.

  4. What is the legal status of modules that are not for distribution? Are they license-free, or are they automatically GPL'd even if not intended for distribution? For practical purposes, in a module that is not for distribution, would the following language have any legal effect: "This module is copyright Company XXX and is not intended for distribution. This software is not licensed and you may not use this module for your own purposes."

Apologies if these questions aren't as precise as they could be; I'm obviously not a lawyer. I really want to use Drupal for this project, but if I can't offer an assurance to the client that the custom code (module code and javascript) will remain proprietary it's a non-starter.

1 Answer 1


(Disclamer: As usual with legal questions, I am not a lawyer, only a lawyer can give you a definitive answer).

Every Drupal module that is written and every javascript code that directly interacts with Drupal (or any other GPL code, but note that jQuery is dual-licensed and also available under the MIT License, this is not relevant when used with Drupal, though), automatically falls under the GPL. That's why GPL is also called a viral license. Everything it "touches" is GPL'ed automatically.

If you give the source code to someone, then he has every right the GPL grants him, including giving the source code to anyone he wants to, modify it and so on. However, viewing a website alone does not distribute your PHP code. JavaScript is a tricky question, see for example https://softwareengineering.stackexchange.com/questions/125955/using-gpl-licensed-jquery-scripts-on-website-with-ads and http://www.gnu.org/philosophy/javascript-trap.html. As far as I understand these, you always distribute the JS code.

So, obfuscating the JavaScript without providing a way to get the unmodified source code or adding a statement like the one you suggested above is in fact a direct violation of the GPL and someone could attempt to sue you.

Also note that there is an extended version of the GPL, the Affero General Public License, which explicitly includes viewing of a website as distribution. CiviCRM for example uses that license, so if you are required to allow visitors access to your custom adjustments/extensions of your website, when using a software like that.

Given the way the Ajax system in Drupal works, most relevant things usually happen on the server side, so that is usually not a big problem. Also, most GPL related lawsuits are usually related to companies selling products which run GPL software (e.g. routers) which don't provide access to their customized source code. I've never heard of a lawsuit against a website violating the GPL, but that could just be ignorance on my side, don't count on that ;)

  • I'd love to have your brain for a day...oh the things I'd know! :)
    – Clive
    Jun 4, 2012 at 22:42
  • Thank you Berdir. Would it be safe to say that any php code interacting with Drupal used within a single company (possibly across multiple domains) is not considered distributed? Also, re: my original question #2, is a company obligated to release the source code of a custom Drupal module that is not distributed if requested to do so?
    – user101570
    Jun 5, 2012 at 14:51
  • Exactly, that's not distributed publicly, so you don't need to release the source code to the public. If you give the code to your client, then he can re-distribute it, of course, but that's probably not in his interest :)
    – Berdir
    Jun 5, 2012 at 15:01

Your Answer

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

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