[Zope] Custom unauthorized message

The Doctor What docwhat@gerf.org
Wed, 18 Apr 2001 10:32:03 -0500


--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Andy McKay (andym@ActiveState.com) [010417 17:43]:
> > > Isn't the traceback a html comment by default? Dont think I changed
> that.
> >
> > Only if you're running in production mode...
> >
> > <rant type=3D"boring" age=3D"old" frequency=3D"often">
> > In either case, it's incorrect HTML and a security risk.
>=20
> <reply type=3D"standard" age=3D"old" frequency=3D"often">
> You could supply the patch to do that...
> </reply>

<patch type=3D"boring" age=3D"new" frequency=3D"once">

--- /tmp/ZPublisher.orig/HTTPResponse.py	Mon Feb 12 12:53:20 2001
+++ HTTPResponse.py	Wed Apr 18 10:29:36 2001
@@ -471,9 +471,11 @@
         tb=3Dself.format_exception(t,v,tb,200)
         tb=3Djoin(tb,'\n')
         tb=3Dself.quoteHTML(tb)
-        if self.debug_mode: _tbopen, _tbclose =3D '<PRE>', '</PRE>'
-        else:               _tbopen, _tbclose =3D '<!--',  '-->'
-        return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose)
+        if self.debug_mode:
+            _tbopen, _tbclose =3D '<PRE>', '</PRE>'
+            return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose)
+        else:
+            return "\n"
=20
     def redirect(self, location, status=3D302, lock=3D0):
         """Cause a redirection without raising an error"""

</patch>

Ciao!

--=20
"Generally you don't see that kind of behavior in major appliances."
		--Dr. Peter Venkmann (Ghostbusters)"

The Doctor What: A Holtje Production             http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC

--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE63bNzkJDks3INMZURAiM4AJ9vGwJdvR/3wGLEQVGLN8vdJ6AsUQCg79g4
935IE5mat/pnXS8cVS+WeTc=
=ZphC
-----END PGP SIGNATURE-----

--BXVAT5kNtrzKuDFl--