[Zope3-checkins] SVN: Zope3/branches/3.2/ Fixed Issue #522. The username and password are now properly quoted before

Derrick Hudson dman at dman13.dyndns.org
Fri Dec 16 17:46:54 EST 2005


Log message for revision 40837:
  Fixed Issue #522.  The username and password are now properly quoted before
  being inserted in principals.zcml.
  

Changed:
  U   Zope3/branches/3.2/src/zope/app/server/mkzopeinstance.py
  U   Zope3/branches/3.2/zopeskel/etc/principals.zcml.in

-=-
Modified: Zope3/branches/3.2/src/zope/app/server/mkzopeinstance.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/server/mkzopeinstance.py	2005-12-16 22:40:51 UTC (rev 40836)
+++ Zope3/branches/3.2/src/zope/app/server/mkzopeinstance.py	2005-12-16 22:46:54 UTC (rev 40837)
@@ -27,6 +27,8 @@
 import shutil
 import sys
 
+from  xml.sax.saxutils import quoteattr as xml_quoteattr
+
 import zope
 
 from zope.app.authentication import password
@@ -212,7 +214,9 @@
         software_home = os.path.dirname(os.path.dirname(zope_init))
         self.replacements = [
             ("<<USERNAME>>", options.username),
+            ("<<USERNAME-XMLATTR>>", xml_quoteattr(options.username)),
             ("<<PASSWORD>>", options.password),
+            ("<<PASSWORD-XMLATTR>>", xml_quoteattr(options.password)),
             ("<<PASSWORD_MANAGER>>", options.password_manager),
             ("<<PYTHON>>", sys.executable),
             ("<<INSTANCE_HOME>>", options.destination),

Modified: Zope3/branches/3.2/zopeskel/etc/principals.zcml.in
===================================================================
--- Zope3/branches/3.2/zopeskel/etc/principals.zcml.in	2005-12-16 22:40:51 UTC (rev 40836)
+++ Zope3/branches/3.2/zopeskel/etc/principals.zcml.in	2005-12-16 22:46:54 UTC (rev 40837)
@@ -26,9 +26,9 @@
   <principal
     id="zope.manager"
     title="Manager"
-    login="<<USERNAME>>"
+    login=<<USERNAME-XMLATTR>>
     password_manager="<<PASSWORD_MANAGER>>"
-    password="<<PASSWORD>>"
+    password=<<PASSWORD-XMLATTR>>
     />
 
   <grant



More information about the Zope3-Checkins mailing list