user2001850
user2001850

Reputation: 487

Intellectual property and minified/obfuscated javascript code

Our vendor provides us a javascript library that we use on the client-side to do some data collection and they encrypt the data before sending out (to their collecting server) using Ajax.

They minified/obfuscated the javascript so that we can't tell easily from the code what they are collecting.

We have asked them if they can provide an un-minified/de-obfucated version so that we can debug it when there is a problem but they said no and the reason is that its their Intellectual Property.

My question is that because we have all the code downloaded to every user's browser and in theory we can manually decode it anyway. Are they really in the position to NOT provide us the un-minified/de-obfuscated code?

Upvotes: 1

Views: 196

Answers (4)

Stephen C
Stephen C

Reputation: 719239

Are they really in the position to NOT provide us the un-minified/de-obfuscated code?

Yes. Unless you have an agreement with them that requires them to supply the original source code, they don't have to do this; i.e. there is no legal obligation.

Assuming that they wrote the code, I would not say there is a moral obligation on them either. That includes the case where you paid them to write the code for you, but you didn't require them to deliver you source code. (For example, they may be charging you less than the development costs, because they expect to recoup their costs by selling the same code to other customers.)

Things are different if they didn't write the code, but they derived it from open source code. Then there may be a requirement on them to provide source code ... depending on the original work's open source license. For example, a GPL license would obligate them to provide the source code (including the source code of their modifications) if you asked for it.

Upvotes: 2

Damon
Damon

Reputation: 4346

No they are not obligated, however, you can unminify it with an automated tool. At that point any good developer can probably look over the code and get a general sense of what's happening, enough to debug anyway. You could also work on deobfuscating but that comes down to how complicated the code is, how important it is for you to have the source, and how many dev hours you are willing to spend on it.

Upvotes: 0

This is a good tool for this.

http://jsbeautifier.org/

But you can get in legal trouble if you use your code without permission.

Although it is difficult to shield code shown in the browser ...

Upvotes: 0

Drag13
Drag13

Reputation: 5998

So here we have two questions. First question is about the law. If they are owners of this code, they can determine any variants of using this code. If they bought them, theirs rights are restricted by the agreement.

Second question is about sence of doing this way. There is no clear answer. I think (but this is only my opinion) that this is not good idea to hide code from you in development process. But... see point first.

Upvotes: 1

Related Questions