Skip to content

Commit

Permalink
Add nonces to all script tags (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam authored Mar 10, 2024
1 parent 8bb0e12 commit bf41bc4
Show file tree
Hide file tree
Showing 45 changed files with 50 additions and 48 deletions.
2 changes: 1 addition & 1 deletion OpenLdapSync/resources/views/ldapSettings.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
if (LABKEY.Security.currentContainer.path != '/'){
Ext4.Msg.alert('Error', 'This page can only be viewed from the site root', function(){
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/alignmentAnalysis.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/alignmentImport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/bamHaplotype.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var outputFileIds = LABKEY.ActionURL.getParameter('outputFileIds');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/begin.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/coverageDepth.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var outputFileIds = LABKEY.ActionURL.getParameter('outputFileIds') || '';
Expand Down
10 changes: 6 additions & 4 deletions SequenceAnalysis/resources/views/fastaHelper.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

function whitelist(){
var names = document.getElementById('whitelistNames').value;
Expand Down Expand Up @@ -34,10 +34,12 @@
document.getElementById('whitelistTarget').value = toKeep.join('\n');
}


LABKEY.Utils.onReady(function(){
document.getElementById('whitelistButton')['onclick'] = whitelist;
});
</script>

This page contains an several basic utilities to process FASTA files. See the instructions above each item for more information.
This page contains several basic utilities to process FASTA files. See the instructions above each item for more information.

<p/>
<h3>1) Subset FASTA Based on List</h3>
Expand All @@ -49,7 +51,7 @@ <h3>1) Subset FASTA Based on List</h3>
<tr>
<td>FASTA Contents:<span></span><br><textarea rows="10" cols="30" id="whitelistFasta"></textarea></td>
<td>Allowable Names:<span></span><br><textarea rows="10" cols="30" id="whitelistNames"></textarea></td>
<td><button id="whitelistButton" onclick=whitelist()>--></button></td>
<td><button id="whitelistButton">--></button></td>
<td>Matching Entries:<span></span><br><textarea rows="10" cols="30" id="whitelistTarget"></textarea></td>
</tr>
</table>
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/haplotypeDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var name = LABKEY.ActionURL.getParameter('haplotypeId');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/importFasta.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var path = LABKEY.ActionURL.getParameter("path");
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/importReadset.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/importTracks.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/insertRefSequence.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/instrumentImport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/instrumentRunDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var runId = LABKEY.ActionURL.getParameter('id');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/libraryDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var rowid = LABKEY.ActionURL.getParameter('libraryId');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/lineagePivot.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/populateSequences.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/readsetDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var readsetId = LABKEY.ActionURL.getParameter('id');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/sampleSheetExport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/sbtToGeneTable.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
//TODO: account for features duplicated across genomes?
Ext4.define('SequenceAnalysis.panel.SBTExportPanel', {
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/search.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var metadata = {
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/sequenceAnalysis.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var analysisId = LABKEY.ActionURL.getParameter('id');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/sequenceDefaults.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
Ext4.create('SequenceAnalysis.panel.SequenceImportSettingsPanel', {
title: 'Sequence Import Defaults'
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/sequenceOutputImport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/siteAdmin.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
if (LABKEY.Security.currentContainer.path != '/' && LABKEY.Security.currentContainer.path != '/Shared'){
Ext4.Msg.alert('Error', 'This page can only be viewed from the site root', function(){
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/snp_haplotype.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var analysisIds = LABKEY.ActionURL.getParameter('analysisIds');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/snp_viewer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var analysisIds = LABKEY.ActionURL.getParameter('analysisIds');
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/splitStrings.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
Ext4.define('SequenceAnalysis.panel.SplitSplittingPanel', {
Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/variantComparison.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/variantProcessing.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down
2 changes: 1 addition & 1 deletion SequenceAnalysis/resources/views/virusStrainDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
if (!LABKEY.ActionURL.getParameter('virus_strain')){
Expand Down
2 changes: 1 addition & 1 deletion blast/resources/views/blast.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion blast/resources/views/settings.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){

Expand Down
2 changes: 1 addition & 1 deletion blast/src/org/labkey/blast/view/jobDetails.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
boolean hasRun = job.isHasRun();
%>

<script type="text/javascript">
<script type="text/javascript" nonce="<%=getScriptNonce()%>">
Ext4.onReady(function(){
Ext4.define('BLAST.panel.BlastDetailsPanel', {
Expand Down
2 changes: 1 addition & 1 deletion jbrowse/resources/views/begin.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion jbrowse/resources/views/databaseDetails.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var objectid = LABKEY.ActionURL.getParameter('databaseId');
Expand Down
2 changes: 1 addition & 1 deletion jbrowse/resources/views/genotypeTable.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
(function ($){
var trackId = LABKEY.ActionURL.getParameter("trackId");
var chr = LABKEY.ActionURL.getParameter("chr");
Expand Down
2 changes: 1 addition & 1 deletion jbrowse/resources/views/jbrowseSearch.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
+function() {
const sessionId = <%=webpartContext%>.databaseId;
LABKEY.App.loadApp('jbrowseSearchWebpart', <%=webpartContext%>.wrapperDivId, sessionId)
Expand Down
2 changes: 1 addition & 1 deletion singlecell/resources/views/cDNAImport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion singlecell/resources/views/libraryExport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion singlecell/resources/views/poolImport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function(){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion singlecell/resources/views/singleCellDataManagement.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
var webpart = <%=webpartContext%>;
Expand Down
2 changes: 1 addition & 1 deletion singlecell/resources/views/singleCellProcessing.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">
<script type="text/javascript" nonce="<%=scriptNonce%>">
Ext4.onReady(function(){
var webpart = <%=webpartContext%>;

Expand Down

0 comments on commit bf41bc4

Please sign in to comment.