huanat / sipml5

Automatically exported from code.google.com/p/sipml5
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SIPml5 declares a global MD5 object which may cause conflict with third party libraries #164

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

---
Overview

   SIPml5 declares a global MD5 class which may conflict with other libraries.
   I'm using webtoolkit.md5.js, which introduces the global function MD5, overwriting the one declared in SIPml-api.js

---
What steps will reproduce the problem?
  1. Include sipml-api.js
  2. Create a global MD5 function (after the include) or include webtoolking.md5.js
  3. Try to register

  The easiest will be to create a global function in the live-demo's html.

---
What is the expected output? 

  SIPml should not fail, it should use his own version of MD5

---
What do you see instead?

  SIPml fails trying to call the function 'hexdigest' on the function declared in step (2).

  Log:
    State machine: tsip_dialog_register_InProgress_2_InProgress_X_401_407_421_494 sipml-api.js:1
    TypeError {stack: (...), message: "Object function (string) {↵↵ function RotateLeft(l…800000...<omitted>...↵} has no method 'hexdigest'"}

---
What version of the product are you using? On what operating system?

  sipML5 v1.3.203

---
Please provide any additional information below.

  Of course, if I include SIPml AFTER webtoolking.md5, my application fails.

  My current workaround is to wrap the MD5 call inside another function that will call the correct implementation.

Original issue reported on code.google.com by juananto...@gmail.com on 19 Mar 2014 at 8:02

GoogleCodeExporter commented 9 years ago
We have a similar issue with the Base64 global

Original comment by matt.che...@gmail.com on 24 Mar 2014 at 4:36