Bob,

We use Jmol/JSmol within Drupal and behind an access "wall" controlled by a university-wide system called Web Access. We had a problem with accessing JSmol instances using Chrome (it worked in Firefox). The issue coincided with the introduction of the "new" jsmol.php file (in March). Since I have zero programming knowledge, I asked a student-programmer who works with us to investigate. His report is cited below. His "fix" works for us.

I would like to check with you, if that is a "valid fix"; I do not know if it creates any problems (security or otherwise). If it is a valid fix, would it be possible and worthwhile to make it a "permanent" part of jsmol.php in JSmol distributions? (i.e make it a "global" fix, not just a "local" one).

Thanks,

PM

   The issue occurs because of our configuration (since jsmol usually
   produces absolute urls while we convert absolute urls pointing to
   the same site to relative urls). The problem is that when it calls
   "getRawDataFromDatabase" it checks for "://" at the beginning of the
   string with "strpos($query, '://') == 0" which is a protocol
   relative url. However, in php when you use "==" both 0 and FALSE are
   treated as the same, so the condition also evaluates to true when
   the query doesn't contain "://" which is the case for relative urls
   (our case). You can fix this by using "===" (which is what I did),
   but it's possible that the behavior with "==" was intended
     (probably not, but it's very ambiguous).

   It is our "bug" but it's uncertain whether the bug was intentional
   or not and could potentially be fixed. There isn't a way for us to
   work around it without modifying the file (unless we authenticate
   with webaccess somehow). It might be worth submitting a bug report
   to see if it was intended (probably unintentional).

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to