Skip to content

Commit

Permalink
Update align docs build remove security vulnerability in underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellGarwood committed May 10, 2021
1 parent fc4d4b1 commit a9d27b3
Show file tree
Hide file tree
Showing 23 changed files with 40 additions and 25 deletions.
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7ddc7654171152e1ccffbd9c5b6c5291
config: d926fb26d0ac3f42a96d60104a7c7f8d
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified SPIERSalign/docs_build/.doctrees/environment.pickle
Binary file not shown.
23 changes: 19 additions & 4 deletions SPIERSalign/docs_build/_static/underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,13 @@
return '\\' + escapes[match];
};

// In order to prevent third-party code injection through
// `_.templateSettings.variable`, we test it against the following regular
// expression. It is intentionally a bit more liberal than just matching valid
// identifiers, but still prevents possible loopholes through defaults or
// destructuring assignment.
var bareIdentifier = /^\s*(\w|\$)+\s*$/;

// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
Expand Down Expand Up @@ -1585,16 +1592,25 @@
});
source += "';\n";

// If a variable is not specified, place data values in local scope.
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
var argument = settings.variable;
if (argument) {
// Insure against third-party code injection.
if (!bareIdentifier.test(argument)) throw new Error(
'variable is not a bare identifier: ' + argument
);
} else {
// If a variable is not specified, place data values in local scope.
source = 'with(obj||{}){\n' + source + '}\n';
argument = 'obj';
}

source = "var __t,__p='',__j=Array.prototype.join," +
"print=function(){__p+=__j.call(arguments,'');};\n" +
source + 'return __p;\n';

var render;
try {
render = new Function(settings.variable || 'obj', '_', source);
render = new Function(argument, '_', source);
} catch (e) {
e.source = source;
throw e;
Expand All @@ -1605,7 +1621,6 @@
};

// Provide the compiled source as a convenience for precompilation.
var argument = settings.variable || 'obj';
template.source = 'function(' + argument + '){\n' + source + '}';

return template;
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/advancednavigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h2>14.4. Swapping Files<a class="headerlink" href="#swapping-files" title="Perm
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/advancedsettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h2>15.2. Constant Autosave<a class="headerlink" href="#constant-autosave" title
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/automatedalignment.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h2>13.2. True Automated Align (Auto Align)<a class="headerlink" href="#true-aut
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/basicaligningprocedure.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h1 id="index">Index</h1>
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Perm
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/keyboardreference.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/navigatingdatasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/panels.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h2>12.4. Auto Align Panel<a class="headerlink" href="#auto-align-panel" title="
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/requirements.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h2>2.2. Data<a class="headerlink" href="#data" title="Permalink to this headlin
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/savingexitingrestarting.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/shiftingrotatingscaling.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h2>11.4. Reset<a class="headerlink" href="#reset" title="Permalink to this head
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/startingspiersalign.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/updatesystem.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/usingctdata.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/whatspiersalignproduces.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SPIERSalign/docs_build/zooming.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2018-2021, Russell Garwood, Mark Sutton, Alan R.T. Spencer
&copy; Copyright 2018-2021, Russell J. Garwood, Mark Sutton, Alan R.T. Spencer

</p>
</div>
Expand Down

0 comments on commit a9d27b3

Please sign in to comment.