From 2c855e5594fd2edc727d539018ffc2aa5afbb7a2 Mon Sep 17 00:00:00 2001 From: slubwama1 Date: Thu, 10 Oct 2024 21:59:17 +0300 Subject: [PATCH 1/7] 3.1.1.8 Resolve Manage Patient Identifier Sources from XSS attack --- omod/src/main/webapp/editIdentifierSource.jsp | 23 +++- .../webapp/resources/html-sanitizer-min.js | 105 ++++++++++++++++++ 2 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 omod/src/main/webapp/resources/html-sanitizer-min.js diff --git a/omod/src/main/webapp/editIdentifierSource.jsp b/omod/src/main/webapp/editIdentifierSource.jsp index 734a4567..171f1441 100644 --- a/omod/src/main/webapp/editIdentifierSource.jsp +++ b/omod/src/main/webapp/editIdentifierSource.jsp @@ -6,6 +6,21 @@ <%@ include file="/WEB-INF/template/header.jsp"%> <%@ include file="localHeader.jsp"%> + + @@ -22,7 +37,7 @@ - +
@@ -69,7 +84,7 @@ *: - + - + - + diff --git a/omod/src/main/webapp/resources/html-sanitizer-min.js b/omod/src/main/webapp/resources/html-sanitizer-min.js new file mode 100644 index 00000000..a0d08c46 --- /dev/null +++ b/omod/src/main/webapp/resources/html-sanitizer-min.js @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2006 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","), + "all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","), + "condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","), + "ease,ease-in,ease-in-out,ease-out,linear,step-end,step-start".split(","),"at,closest-corner,closest-side,ellipse,farthest-corner,farthest-side".split(","),"baseline,middle,sub,super,text-bottom,text-top".split(","),"caption,icon,menu,message-box,small-caption,status-bar".split(","),"fast,faster,slow,slower,x-fast,x-slow".split(","),["above","below","higher","level","lower"],["cursive","fantasy","monospace","sans-serif","serif"],["loud","silent","soft","x-loud","x-soft"],["no-repeat","repeat-x","repeat-y", + "round","space"],["blink","line-through","overline","underline"],["block","flex","grid","table"],["high","low","x-high","x-low"],["nowrap","pre","pre-line","pre-wrap"],["absolute","relative","static"],["alternate","alternate-reverse","reverse"],["border-box","content-box","padding-box"],["capitalize","lowercase","uppercase"],["child","female","male"],["=","opacity"],["backwards","forwards"],["bidi-override","embed"],["bottom","top"],["break-all","keep-all"],["clip","ellipsis"],["contain","cover"], + ["continuous","digits"],["end","start"],["flat","preserve-3d"],["hide","show"],["horizontal","vertical"],["inside","outside"],["italic","oblique"],["left","right"],["ltr","rtl"],["no-content","no-display"],["paused","running"],["suppress","unrestricted"],["thick","thin"],[","],["/"],["all"],["always"],["auto"],["avoid"],["both"],["break-word"],["center"],["circle"],["code"],["collapse"],["contents"],["fixed"],["hidden"],["infinite"],["inset"],["invert"],["justify"],["list-item"],["local"],["medium"], + ["mix"],["none"],["normal"],["once"],["repeat"],["scroll"],["separate"],["small-caps"],["spell-out"],["to"],["visible"]],L={animation:{cssPropBits:517,cssLitGroup:[J[10],J[24],J[29],J[45],J[48],J[54],J[63],J[71],J[72]],cssFns:["cubic-bezier()","steps()"]},"animation-delay":{cssPropBits:5,cssLitGroup:[J[48]],cssFns:[]},"animation-direction":{cssPropBits:0,cssLitGroup:[J[24],J[48],J[72]],cssFns:[]},"animation-duration":"animation-delay","animation-fill-mode":{cssPropBits:0,cssLitGroup:[J[29],J[48], + J[54],J[71]],cssFns:[]},"animation-iteration-count":{cssPropBits:5,cssLitGroup:[J[48],J[63]],cssFns:[]},"animation-name":{cssPropBits:512,cssLitGroup:[J[48],J[71]],cssFns:[]},"animation-play-state":{cssPropBits:0,cssLitGroup:[J[45],J[48]],cssFns:[]},"animation-timing-function":{cssPropBits:0,cssLitGroup:[J[10],J[48]],cssFns:["cubic-bezier()","steps()"]},appearance:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:[]},azimuth:{cssPropBits:5,cssLitGroup:[J[7],J[42],J[56]],cssFns:[]},"backface-visibility":{cssPropBits:0, + cssLitGroup:[J[59],J[62],J[80]],cssFns:[]},background:{cssPropBits:23,cssLitGroup:[J[0],J[18],J[25],J[31],J[34],J[42],J[48],J[49],J[52],J[56],J[61],J[68],J[71],J[74],J[75]],cssFns:"image(),linear-gradient(),radial-gradient(),repeating-linear-gradient(),repeating-radial-gradient(),rgb(),rgba()".split(",")},"background-attachment":{cssPropBits:0,cssLitGroup:[J[48],J[61],J[68],J[75]],cssFns:[]},"background-color":{cssPropBits:2,cssLitGroup:[J[0]],cssFns:["rgb()","rgba()"]},"background-image":{cssPropBits:16, + cssLitGroup:[J[48],J[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"background-position":{cssPropBits:5,cssLitGroup:[J[31],J[42],J[48],J[56]],cssFns:[]},"background-repeat":{cssPropBits:0,cssLitGroup:[J[18],J[48],J[74]],cssFns:[]},"background-size":{cssPropBits:5,cssLitGroup:[J[34],J[48],J[52]],cssFns:[]},border:{cssPropBits:7,cssLitGroup:[J[0],J[9],J[47],J[62],J[64],J[69],J[71]],cssFns:["rgb()","rgba()"]},"border-bottom":"border", + "border-bottom-color":"background-color","border-bottom-left-radius":{cssPropBits:5,cssFns:[]},"border-bottom-right-radius":"border-bottom-left-radius","border-bottom-style":{cssPropBits:0,cssLitGroup:[J[9],J[62],J[64],J[71]],cssFns:[]},"border-bottom-width":{cssPropBits:5,cssLitGroup:[J[47],J[69]],cssFns:[]},"border-collapse":{cssPropBits:0,cssLitGroup:[J[59],J[76]],cssFns:[]},"border-color":"background-color","border-left":"border","border-left-color":"background-color","border-left-style":"border-bottom-style", + "border-left-width":"border-bottom-width","border-radius":{cssPropBits:5,cssLitGroup:[J[49]],cssFns:[]},"border-right":"border","border-right-color":"background-color","border-right-style":"border-bottom-style","border-right-width":"border-bottom-width","border-spacing":"border-bottom-left-radius","border-style":"border-bottom-style","border-top":"border","border-top-color":"background-color","border-top-left-radius":"border-bottom-left-radius","border-top-right-radius":"border-bottom-left-radius", + "border-top-style":"border-bottom-style","border-top-width":"border-bottom-width","border-width":"border-bottom-width",bottom:{cssPropBits:5,cssLitGroup:[J[52]],cssFns:[]},box:{cssPropBits:0,cssLitGroup:[J[60],J[71],J[72]],cssFns:[]},"box-shadow":{cssPropBits:7,cssLitGroup:[J[0],J[48],J[64],J[71]],cssFns:["rgb()","rgba()"]},"box-sizing":{cssPropBits:0,cssLitGroup:[J[25]],cssFns:[]},"caption-side":{cssPropBits:0,cssLitGroup:[J[31]],cssFns:[]},clear:{cssPropBits:0,cssLitGroup:[J[42],J[54],J[71]],cssFns:[]}, + clip:{cssPropBits:0,cssLitGroup:[J[52]],cssFns:["rect()"]},color:"background-color",content:{cssPropBits:8,cssLitGroup:[J[71],J[72]],cssFns:[]},cue:{cssPropBits:16,cssLitGroup:[J[71]],cssFns:[]},"cue-after":"cue","cue-before":"cue",cursor:{cssPropBits:16,cssLitGroup:[J[1],J[48],J[52]],cssFns:[]},direction:{cssPropBits:0,cssLitGroup:[J[43]],cssFns:[]},display:{cssPropBits:0,cssLitGroup:[J[4],J[6],J[20],J[52],J[67],J[71]],cssFns:[]},"display-extras":{cssPropBits:0,cssLitGroup:[J[67],J[71]],cssFns:[]}, + "display-inside":{cssPropBits:0,cssLitGroup:[J[20],J[52]],cssFns:[]},"display-outside":{cssPropBits:0,cssLitGroup:[J[4],J[71]],cssFns:[]},elevation:{cssPropBits:5,cssLitGroup:[J[15]],cssFns:[]},"empty-cells":{cssPropBits:0,cssLitGroup:[J[38]],cssFns:[]},filter:{cssPropBits:0,cssFns:["alpha()"]},"float":{cssPropBits:0,cssLitGroup:[J[42],J[71]],cssFns:[]},font:{cssPropBits:73,cssLitGroup:[J[3],J[8],J[13],J[16],J[41],J[48],J[49],J[69],J[72],J[77]],cssFns:[]},"font-family":{cssPropBits:72,cssLitGroup:[J[16], + J[48]],cssFns:[]},"font-size":{cssPropBits:1,cssLitGroup:[J[8],J[69]],cssFns:[]},"font-stretch":{cssPropBits:0,cssLitGroup:[J[5],J[72]],cssFns:[]},"font-style":{cssPropBits:0,cssLitGroup:[J[41],J[72]],cssFns:[]},"font-variant":{cssPropBits:0,cssLitGroup:[J[72],J[77]],cssFns:[]},"font-weight":{cssPropBits:0,cssLitGroup:[J[3],J[72]],cssFns:[]},height:"bottom",left:"bottom","letter-spacing":{cssPropBits:5,cssLitGroup:[J[72]],cssFns:[]},"line-height":{cssPropBits:1,cssLitGroup:[J[72]],cssFns:[]},"list-style":{cssPropBits:16, + cssLitGroup:[J[2],J[40],J[57],J[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-image":{cssPropBits:16,cssLitGroup:[J[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-position":{cssPropBits:0,cssLitGroup:[J[40]],cssFns:[]},"list-style-type":{cssPropBits:0,cssLitGroup:[J[2],J[57],J[71]],cssFns:[]},margin:"bottom","margin-bottom":"bottom", + "margin-left":"bottom","margin-right":"bottom","margin-top":"bottom","max-height":{cssPropBits:1,cssLitGroup:[J[52],J[71]],cssFns:[]},"max-width":"max-height","min-height":{cssPropBits:1,cssLitGroup:[J[52]],cssFns:[]},"min-width":"min-height",opacity:{cssPropBits:1,cssFns:[]},outline:{cssPropBits:7,cssLitGroup:[J[0],J[9],J[47],J[62],J[64],J[65],J[69],J[71]],cssFns:["rgb()","rgba()"]},"outline-color":{cssPropBits:2,cssLitGroup:[J[0],J[65]],cssFns:["rgb()","rgba()"]},"outline-style":"border-bottom-style", + "outline-width":"border-bottom-width",overflow:{cssPropBits:0,cssLitGroup:[J[52],J[62],J[75],J[80]],cssFns:[]},"overflow-wrap":{cssPropBits:0,cssLitGroup:[J[55],J[72]],cssFns:[]},"overflow-x":{cssPropBits:0,cssLitGroup:[J[44],J[52],J[62],J[75],J[80]],cssFns:[]},"overflow-y":"overflow-x",padding:"opacity","padding-bottom":"opacity","padding-left":"opacity","padding-right":"opacity","padding-top":"opacity","page-break-after":{cssPropBits:0,cssLitGroup:[J[42],J[51],J[52],J[53]],cssFns:[]},"page-break-before":"page-break-after", + "page-break-inside":{cssPropBits:0,cssLitGroup:[J[52],J[53]],cssFns:[]},pause:"border-bottom-left-radius","pause-after":"border-bottom-left-radius","pause-before":"border-bottom-left-radius",perspective:{cssPropBits:5,cssLitGroup:[J[71]],cssFns:[]},"perspective-origin":{cssPropBits:5,cssLitGroup:[J[31],J[42],J[56]],cssFns:[]},pitch:{cssPropBits:5,cssLitGroup:[J[21],J[69]],cssFns:[]},"pitch-range":"border-bottom-left-radius","play-during":{cssPropBits:16,cssLitGroup:[J[52],J[70],J[71],J[74]],cssFns:[]}, + position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,cssLitGroup:[J[71]],cssFns:[]},resize:{cssPropBits:0,cssLitGroup:[J[39],J[54],J[71]],cssFns:[]},richness:"border-bottom-left-radius",right:"bottom",speak:{cssPropBits:0,cssLitGroup:[J[71],J[72],J[78]],cssFns:[]},"speak-header":{cssPropBits:0,cssLitGroup:[J[51],J[73]],cssFns:[]},"speak-numeral":{cssPropBits:0,cssLitGroup:[J[35]],cssFns:[]},"speak-punctuation":{cssPropBits:0,cssLitGroup:[J[58],J[71]],cssFns:[]},"speech-rate":{cssPropBits:5, + cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0, + cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()", + "steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]], + cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48], + J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius", + "rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay", + "translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X; + (function(){function g(a){var f=parseInt(a.substring(1),16);return 65535>10),56320+(f&1023))):f==f?String.fromCharCode(f):" ">a[1]?"":a[1]}function w(a,f){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,f)+'"'}function M(a){return E[a]||(E[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function x(a){return e[a]||(e[a]=("\u0010">a?"%0":"%")+a.charCodeAt(0).toString(16))}var E={"\\":"\\\\"},e={"\\":"%5c"},v=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|<\!--|--\>|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]=|[^\"'\\\\/]|/(?![/*])","gi"), + b=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),a=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");X=function(a){return a.replace(b,g)};U=function(b){for(var b=(""+b).replace(/\r\n?/g,"\n").match(v)||[],f=0,h=" ",d=0,y=b.length;d"==l||"<\!--"==l||"\ufeff"==l||32>=g?" ": + /url\(/i.test(l)?"url("+w(l.replace(a,""),x)+")":l;if(h!=l||" "!=l)b[f++]=h=l}b.length=f;return b}})();"undefined"!==typeof window&&(window.lexCss=U,window.decodeCss=X);var Y=function(){function g(d){d=(""+d).match(k);return!d?s:new e(v(d[1]),v(d[2]),v(d[3]),v(d[4]),v(d[5]),v(d[6]),v(d[7]))}function w(d,a){return"string"==typeof d?encodeURI(d).replace(a,M):s}function M(d){d=d.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(d>>4&15)+"0123456789ABCDEF".charAt(d&15)}function x(d){if(d===s)return s;for(var d=d.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/"),a=b,h;(h=d.replace(a,"$1"))!=d;d=h);return d}function E(d,h){var b=d.T(),f=h.K();f?b.ga(h.j):f=h.X(); + f?b.da(h.n):f=h.Y();f?b.ea(h.k):f=h.$();var g=h.g,k=x(g);if(f)b.ca(h.V()),k=k&&k.replace(a,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=x(b.g||"").replace(a,""),e=k.lastIndexOf("/")+1,k=x((e?k.substring(0,e):"")+x(g)).replace(a,"")}else k=k&&k.replace(a,""),k!==g&&b.G(k);f?b.G(k):f=h.aa();f?b.O(h.l):f=h.Z();f&&b.fa(h.o);return b}function e(d,a,h,f,b,g,k){this.j=d;this.n=a;this.k=h;this.h=f;this.g=b;this.l=g;this.o=k}function v(d){return"string"==typeof d&&0]/g,v={"\n":"%0a","\u000c":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"}, + b=/^(?:([^:/?# ]+):)?/,a=/^(?:https?|mailto)$/i;aa=function(){var a={};return function y(f,b,k,e,N){var f=E(f),u=L[f];if(!u||"object"!==typeof u)b.length=0;else{for(var i=u.cssPropBits,q=i&80,B=i&1536,F=NaN,r=0,o=0;r=I)j=i&1?j:"";else if(R=j.charCodeAt(1),v=j.charCodeAt(2),P=48<=R&&57>=R,S=48<=v&&57>=v,43===I&&(P||46===R&&S))j=i&1?(P?"":"0")+j.substring(1):"";else if(45===I&&(P||46===R&&S))j=i&4?(P?"-":"-0")+j.substring(1):i&1?"0":"";else if(46===I&&P)j=i&1?"0"+j:"";else if('url("'===j.substring(0,5))j=k&&i&16?g(x(M(e,b[r].substring(5,j.length-2)),f,k)): + "";else if("("===j.charAt(j.length-1))a:{D=b;G=r;j=1;K=G+1;for(I=D.length;K"]= + f["+"]=f["~"]=f;ba=function(a,d,b){function g(i,r){function o(b,f,g){var y,e,i,l,o,m=n;y="";if(bh&&" "===b[e-1]&&--e;f.startAtrule&&f.startAtrule(b[d].toLowerCase(),b.slice(h,e));a="{"===b[a]?w(b,a,g,f):a+1;f.endAtrule&&f.endAtrule()}return a}function w(b,a,k,f){++a;for(f.startBlock&&f.startBlock();ad)return d=~d,d===h?d+1:d;var y=b[d];if("{"!==y)return d===h?d+1:d;a=d+1;d>h&&" "===b[d-1]&&--d;for(f.startRuleset&&f.startRuleset(b.slice(h,d));ad)d=~d;else{for(var e=[],l=0,w=a;w])/g;f=b+"";if(G)f=f.split(H);else{for(var e=[],h=0,j;(j=H.exec(f))!==s;)e.push(f.substring(h,j.index)),e.push(j[0]),h=j.index+j[0].length;e.push(f.substring(h));f=e}a(d,f,0,{r:C,C:C},g)}}function b(b,d,g,f,t){return function(){a(b,d,g,f,t)}}function a(a,d,p,e,t){try{a.H&&0==p&&a.H(t);for(var h, + z,j,i=d.length;p"===d[p+1])p+=2,j=h[1].toLowerCase(),a.t&&a.t(j,t,A,b(a,d,p,e,t));else{var m=d,q=p,r=a,u=t,v=A,y=e,w=f(m,q);w?(r.t&&r.t(w.name,u,v,b(r,m,q,y,u)),p=w.next):p=m.length}else a.e&&a.e("</",t,A,b(a,d,p,e,t));break;case "<":if(h=/^([-\w:]+)\s*\/?/.exec(l))if(h[0].length===l.length&& + ">"===d[p+1]){p+=2;j=h[1].toLowerCase();a.w&&a.w(j,[],t,A,b(a,d,p,e,t));var B=g.f[j];B&K&&(p=k(d,{name:j,next:p,c:B},a,t,A,e))}else{var m=d,q=a,r=t,u=A,v=e,x=f(m,p);x?(q.w&&q.w(x.name,x.R,r,u,b(q,m,x.next,v,r)),p=x.c&K?k(m,x,q,r,u,v):x.next):p=m.length}else a.e&&a.e("<",t,A,b(a,d,p,e,t));break;case "<\!--":if(!e.C){for(z=p+1;z"===d[z]&&/--$/.test(d[z-1]));z++);if(z"!==d[z];z++);z"!==d[z];z++);z":a.e&&a.e(">",t,A,b(a,d,p,e,t));break;case "":break;default:a.e&&a.e(o,t,A,b(a,d,p,e,t))}}a.B&&a.B(t)}catch(E){if(E!==A)throw E;}}function k(a,d,f,h,t,j){var z=a.length;T.hasOwnProperty(d.name)|| + (T[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var i=T[d.name],k=d.next,l=d.next+1;l"!==a[h];h++)e+=a[h];if(!(j<=h)){for(var l=[];""!== + e;)if(d=ja.exec(e))if(d[4]&&!d[5]||d[6]&&!d[7]){for(var d=d[4]||d[6],i=C,e=[e,a[h++]];h"===a[h])break}else 0<=a[h].indexOf(d)&&(i=n);e.push(a[h])}if(j<=h)break;e=e.join("")}else{var i=d[1].toLowerCase(),k;if(d[2]){k=d[3];var m=k.charCodeAt(0);if(34===m||39===m)k=k.substr(1,k.length-2);k=x(k.replace(o,""))}else k="";l.push(i,k);e=e.substr(d[0].length)}else e=e.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function h(a){function b(a,d){f||d.push(a)}var d,f;return v({startDoc:function(){d= + [];f=C},startTag:function(b,e,h){if(!f&&g.f.hasOwnProperty(b)){var j=g.f[b];if(!(j&g.c.FOLDABLE)){var k=a(b,e);if(k){if("object"!==typeof k)throw Error("tagPolicy did not return object (old API?)");if("attribs"in k)e=k.attribs;else throw Error("tagPolicy gave no attribs");var i;"tagName"in k?(i=k.tagName,k=g.f[i]):(i=b,k=j);if(j&g.c.OPTIONAL_ENDTAG){var l=d[d.length-1];l&&l.D===b&&(l.v!==i||b!==i)&&h.push("")}j&g.c.EMPTY||d.push({D:b,v:i});h.push("<",i);b=0;for(l=e.length;b");j&g.c.EMPTY&&!(k&g.c.EMPTY)&&h.push("")}else f=!(j&g.c.EMPTY)}}},endTag:function(a,b){if(f)f=C;else if(g.f.hasOwnProperty(a)){var e=g.f[a];if(!(e&(g.c.EMPTY|g.c.FOLDABLE))){if(e&g.c.OPTIONAL_ENDTAG)for(e=d.length;0<=--e;){var h=d[e].D;if(h===a)break;if(!(g.f[h]&g.c.OPTIONAL_ENDTAG))return}else for(e=d.length;0<=--e&&d[e].D!==a;);if(!(0>e)){for(h=d.length;--h>e;){var j=d[h].v;g.f[j]&g.c.OPTIONAL_ENDTAG||b.push("")}e< + d.length&&(a=d[e].v);d.length=e;b.push("")}}}},pcdata:b,rcdata:b,cdata:b,endDoc:function(a){for(;d.length;d.length--)a.push("")}})}function d(a,b,d,f,e){if(!e)return s;try{var g=Y.parse(""+a);if(g&&(!g.K()||ka.test(g.W()))){var h=e(g,b,d,f);return h?h.toString():s}}catch(j){}return s}function y(a,b,d,f,e){d||a(b+" removed",{S:"removed",tagName:b});if(f!==e){var g="changed";f&&!e?g="removed":!f&&e&&(g="added");a(b+"."+d+" "+g,{S:g,tagName:b,la:d,oldValue:f,newValue:e})}} + function l(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function V(a,b,f,e,h){for(var j=0;j",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:"\u00a0"},q=/^#(\d+)$/,B=/^#x([0-9A-Fa-f]+)$/,F=/^[A-Za-z][A-za-z0-9]+$/,r="undefined"!==typeof window&& + window.document?window.document.createElement("textarea"):s,o=/\0/g,j=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,I=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,R=/&/g,ia=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,P=/[<]/g,S=/>/g,D=/\"/g,ja=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,G=3==="a,b".split(/(,)/).length,K=g.c.CDATA|g.c.RCDATA,A={},T={},ka=/^(?:https?|mailto)$/i,m={};m.pa=m.escapeAttrib=E;m.ra=m.makeHtmlSanitizer=h;m.sa=m.makeSaxParser=v;m.ta=m.makeTagPolicy= + ea;m.wa=m.normalizeRCData=e;m.xa=m.sanitize=function(a,b,d,e){return Q(a,ea(b,d,e))};m.ya=m.sanitizeAttribs=V;m.za=m.sanitizeWithPolicy=Q;m.Ba=m.unescapeEntities=x;return m}($),la=ha.sanitize;"undefined"!==typeof window&&(window.html=ha,window.html_sanitize=la);})(); From ae1af38750d2f8bd6df52d7c1782e41e7dd12642 Mon Sep 17 00:00:00 2001 From: slubwama1 Date: Fri, 11 Oct 2024 02:05:23 +0300 Subject: [PATCH 2/7] add firstIdentifierBase --- omod/src/main/webapp/editIdentifierSource.jsp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/omod/src/main/webapp/editIdentifierSource.jsp b/omod/src/main/webapp/editIdentifierSource.jsp index 171f1441..0b88ba8e 100644 --- a/omod/src/main/webapp/editIdentifierSource.jsp +++ b/omod/src/main/webapp/editIdentifierSource.jsp @@ -7,16 +7,16 @@ <%@ include file="localHeader.jsp"%> @@ -37,7 +37,7 @@ function beforeSubmit() { - +
@@ -91,11 +106,11 @@
:
:
:
@@ -56,7 +56,7 @@ function beforeSubmit() { From 5ddab588e6b6907c9cba890629e856c835575875 Mon Sep 17 00:00:00 2001 From: slubwama1 Date: Fri, 11 Oct 2024 02:14:07 +0300 Subject: [PATCH 3/7] keep it consistent --- omod/src/main/webapp/editIdentifierSource.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omod/src/main/webapp/editIdentifierSource.jsp b/omod/src/main/webapp/editIdentifierSource.jsp index 0b88ba8e..7a362b67 100644 --- a/omod/src/main/webapp/editIdentifierSource.jsp +++ b/omod/src/main/webapp/editIdentifierSource.jsp @@ -7,7 +7,7 @@ <%@ include file="localHeader.jsp"%>
- ${source.identifierType.validator} + @@ -89,7 +89,7 @@ function beforeSubmit() {
* - : + : @@ -99,7 +99,7 @@ function beforeSubmit() { - +