bugSamizdat - Bugs: bug #23848, missing REXML::Formatters error...

 
 

bug #23848: missing REXML::Formatters error (NameError) is not caught in 080703-2.sanitize.rb

Submitter:  Boud Roukema <boud>
Submitted:  Mon 14 Jul 2008 11:36:43 PM UTC
   
 
Category:  None Severity:  4 - Important
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 22 Oct 2008 04:39:30 PM UTC, comment #1: 

The fix committed to CVS, thanks!

Dmitry Borodaenko <angdraug>
Group administrator
Mon 14 Jul 2008 11:36:43 PM UTC, original submission:  

PROBLEM: The rescue in sanitize.rb fails for 080703-2 installed on debian-etch with ruby-1.8  1.8.5-4etch1:


[error] mod_ruby: error in ruby
[error] mod_ruby: /usr/lib/ruby/1.8/samizdat/sanitize.rb:37: uninitialized constant REXML::Formatters (NameError)
[error] mod_ruby:   from /usr/lib/ruby/1.8/samizdat/engine.rb:36:in `require'
[error] mod_ruby:   from /usr/lib/ruby/1.8/samizdat/engine.rb:36
[error] mod_ruby:   from /usr/share/samizdat/cgi-bin/dispatch.rb:13:in `require'
...


In other words, the browser gives an error message.


PROPOSED SOLUTION: Use the same rescue if there's a NameError.


-  rescue LoadError
+  rescue LoadError, NameError



COMMENT: This avoids having an error message. i haven't actually checked if the functionality is correct, though since all rendered content should pass through sanitize, i would guess it's OK.


Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #16162:  080714_sanitize_0.1.patch added by boud (391B - text/x-patch - same solution written as a patch file)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by angdraug (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-22 angdraug StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2008-07-19 boud Attached File- Added 080714_sanitize_0.1.patch, #16162
    2008-07-15 boud SummaryBUG in 080703-2.sanitize.rb missing REXML::Formatters error (NameError) is not caught in 080703-2.sanitize.rb

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code