Skip to content

Commit

Permalink
Strip forward slashes from names to workaround security issue with Ca…
Browse files Browse the repository at this point in the history
…mbridge proxy server
  • Loading branch information
dan2097 committed Dec 3, 2023
1 parent 0203443 commit ad934cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" href="opsin.css" type="text/css" media="all" />
<title>OPSIN: Open Parser for Systematic IUPAC Nomenclature</title>
<script src="jquery-1.12.4.min.js"></script>
<script src="opsin.js?v=20221102a"></script>
<script src="opsin.js?v=20231203"></script>
<style media="all">
div#content-primary img#depiction {
display: inline;
Expand Down Expand Up @@ -76,7 +76,7 @@ <h1>OPSIN: Open Parser for Systematic IUPAC nomenclature</h1>
<input type="submit" value="Submit" />
</fieldset>
</form>
<p><span id="last-update">Updated 2023-08-12: Minor updates</span><br/>If you have found OPSIN useful in your work citing our <a href="https://pubs.acs.org/doi/full/10.1021/ci100384d">paper</a> would be very much appreciated. Depiction courtesy of the <a href="https://lifescience.opensource.epam.com/indigo/">Indigo Toolkit</a></p>
<p><span id="last-update">Updated 2023-12-03: Workaround for issue with names containing forward slashes</span><br/>If you have found OPSIN useful in your work citing our <a href="https://pubs.acs.org/doi/full/10.1021/ci100384d">paper</a> would be very much appreciated. Depiction courtesy of the <a href="https://lifescience.opensource.epam.com/indigo/">Indigo Toolkit</a></p>
<div id="opsininstructions">
<p>Enter a chemical name into the box and then click submit.<br />
The chemical structure described by the name, or why it could not be interpreted, will appear here.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/opsin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(document).ready(function() {
$("#stdinchi").text("");
$("#stdinchikey").text("");
$("#smiles").text("");
let chemicalNameUrlEncoded = encodeURIComponent($("#chemicalName").val());
let chemicalNameUrlEncoded = encodeURIComponent($("#chemicalName").val().replace(/\//g, ""));

let structureOutputEls = document.getElementsByClassName("structureOutput");
for(let i = 0, len = structureOutputEls.length; i < len; i++) {
Expand Down

0 comments on commit ad934cb

Please sign in to comment.