markt 2004/05/22 11:48:07
Modified: . tomcat.nsi
Log:
Fix bug 15798. Install fails if '&' appears in admin user name or password.
Revision Changes Path
1.37 +22 -1 jakarta-tomcat-4.0/tomcat.nsi
Index: tomcat.nsi
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/tomcat.nsi,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- tomcat.nsi 22 May 2004 17:34:57 -0000 1.36
+++ tomcat.nsi 22 May 2004 18:48:07 -0000 1.37
@@ -12,6 +12,9 @@
InstallColors FF8080 000000
InstProgressFlags smooth colored
+!include "StrFunc.nsh"
+${StrRep}
+
PageEx license
LicenseText "You must read the following license before installing:"
LicenseData INSTALLLICENSE
@@ -317,6 +320,14 @@
ReadINIStr $R1 $PLUGINSDIR\config.ini "Field 5" State
ReadINIStr $R2 $PLUGINSDIR\config.ini "Field 7" State
+ Push $R1
+ Call xmlEscape
+ Pop $R1
+
+ Push $R2
+ Call xmlEscape
+ Pop $R2
+
StrCpy $R4 'port="$R0"'
StrCpy $R5 '<user name="$R1" password="$R2" roles="admin,manager" />'
@@ -372,6 +383,16 @@
Sleep 500
BringToFront
+FunctionEnd
+
+
+Function xmlEscape
+ Pop $0
+ ${StrRep} $0 $0 "&" "&"
+ ${StrRep} $0 $0 "$\"" """
+ ${StrRep} $0 $0 "<" "<"
+ ${StrRep} $0 $0 ">" ">"
+ Push $0
FunctionEnd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]