jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 1799] Changed - possible bug in ORO's Util.substitute
Date Sun, 20 May 2001 10:52:07 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1799

*** shadow/1799	Thu May 17 15:25:22 2001
--- shadow/1799.tmp.10283	Sun May 20 03:52:07 2001
***************
*** 2,9 ****
  | possible bug in ORO's Util.substitute                                      |
  +----------------------------------------------------------------------------+
  |        Bug #: 1799                        Product: ORO                     |
! |       Status: ASSIGNED                    Version: 2.0.2                   |
! |   Resolution:                            Platform: PC                      |
  |     Severity: Normal                   OS/Version: Linux                   |
  |     Priority: High                      Component: Main                    |
  +----------------------------------------------------------------------------+
--- 2,9 ----
  | possible bug in ORO's Util.substitute                                      |
  +----------------------------------------------------------------------------+
  |        Bug #: 1799                        Product: ORO                     |
! |       Status: RESOLVED                    Version: 2.0.2                   |
! |   Resolution: INVALID                    Platform: PC                      |
  |     Severity: Normal                   OS/Version: Linux                   |
  |     Priority: High                      Component: Main                    |
  +----------------------------------------------------------------------------+
***************
*** 262,265 ****
      }
  
  ------- Additional Comments From dfs@apache.org  2001-05-17 15:25 -------
! Received bug report and investigating.
--- 262,604 ----
      }
  
  ------- Additional Comments From dfs@apache.org  2001-05-17 15:25 -------
! Received bug report and investigating.
! 
! ------- Additional Comments From dfs@apache.org  2001-05-20 03:52 -------
! After much investigation, this bug appears to be invalid.  The regular
! expression makes use of constructs such as zero-width negative lookahead
! assertions in a way that creates an NFA that can infinitely loop.  I
! javaized Jeffrey Friedl's email regular expression and ran it through
! the provided test program with no problems.  An error must have been made
! with the original javaization.  Will wait for the bug reporter to confirm
! that the corrected expression does what he needs.  The corrected expression
! is (capturing parentheses might not be exactly where the reporter wants
! them though; the first capturing set captures the text before the email
! address an the second set captures the actual RFC 822 address):
! 	String regex ="(       [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*    )                                      (                     
! (?:         [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])                        
! |                                  \"                                           
! [^\\\\x80-\\xff\\n\\015\"] *                                   (?:  \\
! [^\\\\x80-\\xff]  [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                                     )   
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*        (?:        \\.    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*         (?:        
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])                        
! |                                  \"                                           
! [^\\\\x80-\\xff\\n\\015\"] *                                   (?:  \\
! [^\\\\x80-\\xff]  [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                                     )   
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*         )* @    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*            (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          (?:        \\.    [\\040\\t]*                      
! (?:    \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*       (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          )*                             
! |                                                (?:        
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])                        
! |                                  \"                                           
! [^\\\\x80-\\xff\\n\\015\"] *                                   (?:  \\
! [^\\\\x80-\\xff]  [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                                    
! )                          
! [^()<>@,;:\".\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] *                 
! (?:      (?:    \\(                                     
! [^\\\\x80-\\xff\\n\\015()] *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                              |    
! \"                                            [^\\\\x80-\\xff\\n\\015\"]
! *                                   (?:  \\ [^\\\\x80-\\xff] 
! [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                      )      
! [^()<>@,;:\".\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] *               )*     
! <    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*                            (?:     @   
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*            (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          (?:        \\.    [\\040\\t]*                      
! (?:    \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*       (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          )*    (?: ,    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*     @    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*            (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          (?:        \\.    [\\040\\t]*                      
! (?:    \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*       (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          )* )*      :       [\\040\\t]*                      
! (?:    \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*      )?                      (?:        
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])                        
! |                                  \"                                           
! [^\\\\x80-\\xff\\n\\015\"] *                                   (?:  \\
! [^\\\\x80-\\xff]  [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                                     )   
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*        (?:        \\.    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*         (?:        
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])                        
! |                                  \"                                           
! [^\\\\x80-\\xff\\n\\015\"] *                                   (?:  \\
! [^\\\\x80-\\xff]  [^\\\\x80-\\xff\\n\\015\"] * )*           
! \"                                                     )   
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*         )* @    [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*            (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          (?:        \\.    [\\040\\t]*                      
! (?:    \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*       (?:     
! [^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff]+     
! (?![^(\\040)<>@,;:\".\\\\[\\]\\000-\\037\\x80-\\xff])     |       
! \\[                                (?: [^\\\\x80-\\xff\\n\\015\\[\\]] |  \\
! [^\\\\x80-\\xff]  )*         \\]                              )     
! [\\040\\t]*                       (?:   
! \\(                                      [^\\\\x80-\\xff\\n\\015()]
! *                                   
! (?:                                           (?:  \\ [^\\\\x80-\\xff]  |   
! \\(                                   [^\\\\x80-\\xff\\n\\015()]
! *                                  (?:  \\ [^\\\\x80-\\xff]  
! [^\\\\x80-\\xff\\n\\015()] * )*           \\)                           
! )                [^\\\\x80-\\xff\\n\\015()] *                               
! )*                                     \\)                             
! [\\040\\t]* )*          )*            >                               )";

Mime
View raw message