Re: [Zope] standard_error_message woes!

2001-01-03 Thread Dieter Maurer

Chris Withers writes:
  John Chandler wrote:
   
   As already mentioned, not all errors (unfortunately) get handled by
   standard_error_message - authorisation being the main culprit. In addition, if
   an error occurs in a standard_error_message it'll also cause the plain, default
   error page to be displayed.
  
  Hurm... I would have thought/it would be nice if an error occurs in
  standard_error_message then, the next standard_error_message up the
  acquisition path would get used, resorting to the hard coded one only if
  there isn't anything else...
I do not agree with you here.

  You should be able to make "standard_error_message"s that
  do not generate secondary errors.
  If you fail, a crude minimal error handling should be okay
  as a last resort.

Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-03 Thread Chris Withers

Dieter Maurer wrote:
 
   You should be able to make "standard_error_message"s that
   do not generate secondary errors.
   If you fail, a crude minimal error handling should be okay
   as a last resort.

Hmmm... maybe there should be an option on this then? ;-)

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-03 Thread albert boulanger


 You should be able to make "standard_error_message"s that
 do not generate secondary errors.
 If you fail, a crude minimal error handling should be okay
 as a last resort.

The Lisp system on Symbolics had both. It had a too-many-error-frame
detector for the error reporter that used a crude system when
triggered. It would be nice that the crude error messages be settable
in a way that is hardended, perhaps env vars?

FYI,
Albert Boulanger
[EMAIL PROTECTED]
http://www.vpatch.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-03 Thread Chris Withers

albert boulanger wrote:
 
  You should be able to make "standard_error_message"s that
  do not generate secondary errors.
  If you fail, a crude minimal error handling should be okay
  as a last resort.
 
 The Lisp system on Symbolics had both. It had a too-many-error-frame
 detector for the error reporter that used a crude system when
 triggered. It would be nice that the crude error messages be settable
 in a way that is hardended, perhaps env vars?

I like the idea of a text file for these, rather than being embedded in
the python source. Surely that can't be too hard?
(Squishdot does this already for some things ;-)

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-03 Thread Dieter Maurer

Chris Withers writes:
  Dieter Maurer wrote:
   
 You should be able to make "standard_error_message"s that
 do not generate secondary errors.
 If you fail, a crude minimal error handling should be okay
 as a last resort.
  
  Hmmm... maybe there should be an option on this then? ;-)
I think, someone like GvR would call it "feature bloat" ;-)


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-02 Thread John Chandler

Just catching up on my mail...

 Gaaah!  I'm totally miffed/pissed/confused/sad about this.
 
 I have Zope 2.2.4, and if I go to:
 http://docwhat.gerf.org:9673/fish  (an non-existant object)
 I get the HTTPResponse.py _error_html() function as called by
 notFoundError().

As already mentioned, not all errors (unfortunately) get handled by
standard_error_message - authorisation being the main culprit. In addition, if
an error occurs in a standard_error_message it'll also cause the plain, default
error page to be displayed.

Looks like you're handling a 404 (Not Found) so I'd advise checking your custom
page is correct first as an error there could be causing the custom error
message to be superceded.

All good fun :-/

Hope that's a useful starter...


John


--
 John Chandler  /  Software Developer  /  New Information Paradigms Ltd
   [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ]

 The opinions above aren't those of my company...
   ...but then, they aren't really mine either.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2001-01-02 Thread Chris Withers

John Chandler wrote:
 
 As already mentioned, not all errors (unfortunately) get handled by
 standard_error_message - authorisation being the main culprit. In addition, if
 an error occurs in a standard_error_message it'll also cause the plain, default
 error page to be displayed.

Hurm... I would have thought/it would be nice if an error occurs in
standard_error_message then, the next standard_error_message up the
acquisition path would get used, resorting to the hard coded one only if
there isn't anything else...

Is that the case?

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2000-12-29 Thread Chris Withers

 Like:
 http://site.org/fish
 
 It finds the keyword fish, and sees there is a legit URL:
 http://site.org/software/beta/fish
 
 And redirects it.
 
 But that'd need t ZCatalog at least.

And probably the PathHandler product to do what you want ;-)

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2000-12-29 Thread Chris Withers

Tino Wildenhain wrote:
 
 facility for patches). This means including the error pages for
 40x. I'm also a fan of localisated error messages as well as
 wap-alized ones ;)

Hmm... well, this seems like a good Fishbowl project for me.

Basically, that code shouldn't be tacked on the end, the error message
should be generated by the standard_error_message entirely and not at
all dependent on whether or not Zope is running in Debug mode. It's not
a big change (maybe 1hrs work?) but, like you, I can't remember where
the code lives.

Almost related, how about in the same project changing the hard coded
errors for security (and anything else like that) so that they use the
nearest standard_error_message up the tree?

Can't be more than a coupla person-days work... maybe DC has some
resource they could spare for this? I would give it a go, but Squishdot
seems quite buggy right now and I'd really like to fix it ;-)

 PS: Chris, will you be in amsterdam?

Sorry, can't make it :-S

cheers, good luck to all for the new year,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2000-12-27 Thread The Doctor What

* Jason Byron ([EMAIL PROTECTED]) [001223 01:04]:
 There are two files:
 /lib/python/ZPublisher/HTTPResponse.py
 /lib/python/OFS/Application.py
 
 that contain error pages hard coded in.
 
 you get the HTTPResponse.py code for errors like:
 
 403: 'Forbidden',
 404: 'Not Found',
 405: 'Method Not Allowed',
 
 stuff like that.
 
 This error code is not parsed like normal dtml and so
 you can't simply replace it with: 
 
 """dtml-var standard_error_message"""
 
 I think this is because these are standard error codes
 that have to do with the web server and they must work
 even if the object database doesn't.
 
 There must be a more detailed reason why these errors
 aren't connected to the db, but someone else will have
 to answer that one. :)

Well I'm very tempted to start mucking in and letting it call an
'external' python method of some sort.  At the very least, I'd like
the page to be able to look up a list of 'words' and redirect to a
webpage if it matches

Like:
http://site.org/fish

It finds the keyword fish, and sees there is a legit URL:
http://site.org/software/beta/fish

And redirects it.

But that'd need t ZCatalog at least.

G.

Ciao!

-- 
Chemist who falls in acid is absorbed in work.

The Doctor What: Second Baseman  http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2000-12-24 Thread Tino Wildenhain

Hi Chris,

Chris Withers wrote:

*snip*
 
 PS: almost related, have you noticed how there's no way you can prevent Zope
 (other than hacking the source) from tacking the error message on the end of
 the HTML stream, even in production mode? Not only does this produce badly
 formed HTML, but it gives out way more information that it should to someone
 potentially looking to hack your site...

Where was that? I got the position in the source some time... 
May be we can patch it here and there to get what we all want ;-)
And then put it in the collector (which currently lacks an upload
facility for patches). This means including the error pages for
40x. I'm also a fan of localisated error messages as well as
wap-alized ones ;)

In the meantime, have a merry x-mas :-)

Regards
Tino

PS: Chris, will you be in amsterdam?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] standard_error_message woes!

2000-12-23 Thread Chris Withers

 I think this is because these are standard error codes
 that have to do with the web server and they must work
 even if the object database doesn't.

 There must be a more detailed reason why these errors
 aren't connected to the db, but someone else will have
 to answer that one. :)

This keeps on coming up. It's because certain errors aren't processed as you
would expect. For example, try putting a space in a URL going to a Zope
server. You get a very horrible error, probably from Medusa... yurch!

What you're experiencing is something similar. Most errors do go to the
nearest standard_error_message, but there are a load (security being the
most notable ones) of errors that just return the hard coded error message,
which isn't very nice :-(

There was talk of fixing this a while back but nothing happened...

Chris

PS: almost related, have you noticed how there's no way you can prevent Zope
(other than hacking the source) from tacking the error message on the end of
the HTML stream, even in production mode? Not only does this produce badly
formed HTML, but it gives out way more information that it should to someone
potentially looking to hack your site...


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] standard_error_message woes!

2000-12-22 Thread The Doctor What

Gaaah!  I'm totally miffed/pissed/confused/sad about this.

I have Zope 2.2.4, and if I go to:
http://docwhat.gerf.org:9673/fish  (an non-existant object)
I get the HTTPResponse.py _error_html() function as called by
notFoundError().

Now, if I go to:
http://zope.org/fish

I get a nice fully customized error page, which includes where I
*might* have ment to go

What's going on!

According to http://www.zope.org/Members/JohnC/StandardErrorMessage

I should be able to get this to work, he has a dtml-if
"error_type=='NotFound'"... example even!

Gh!!!

*goes off in a corner, pulling out hair while quitely sobbing*

-- 
"This is the Steve Allen show. To those of you lunging for the channel selector, 'Good 
Night!'"

The Doctor What: Un-Humble   http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )