You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/05/15 16:33:48 UTC

[Bug 56528] New: "bad flags delimiter" - improve helpfulness

https://issues.apache.org/bugzilla/show_bug.cgi?id=56528

            Bug ID: 56528
           Summary: "bad flags delimiter" - improve helpfulness
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: PatchAvailable
          Severity: enhancement
          Priority: P2
         Component: mod_rewrite
          Assignee: bugs@httpd.apache.org
          Reporter: Chaosed0@gmail.com

Created attachment 31627
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31627&action=edit
Improve error reporting in mod_rewrite

The parser in mod_rewrite always interprets the third argument to
RewriteRule/RewriteCond as optional flags. However, unescaped whitespace is
fairly easy to accidentally insert into a RewriteRule/RewriteCond directive.
When this happens, "bad flag delimiters" is displayed since the rogue
whitespace causes the parser to interpret a chunk of one of the args as flags.
This error is a spectacularly bad way to express this (even if it's strictly
true).

The attached patch attempts to improve the error reporting of the relevant
section in mod_rewrite.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56528] "bad flags delimiter" - improve helpfulness

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56528

Edward Lu <Ch...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31627|0                           |1
        is obsolete|                            |

--- Comment #2 from Edward Lu <Ch...@gmail.com> ---
Created attachment 31685
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31685&action=edit
Improve error reporting in mod_rewrite

Silly of me - forgot my order of operations.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56528] "bad flags delimiter" - improve helpfulness

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56528

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #3 from Eric Covener <co...@gmail.com> ---
Thanks, committed to trunk in r1652507.

(reminded of this patch by my own whitespace typo in RewriteCond)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56528] "bad flags delimiter" - improve helpfulness

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56528

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56528] "bad flags delimiter" - improve helpfulness

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56528

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Eric Covener <co...@gmail.com> ---
This seems to trigger on:

RewriteRule .* - [G]

RewriteRule: bad flag delimiters: third argument must end with ']' but found
[G] - unintended whitespace within the flags definition? (pattern='.*',
substitution='-', flags='[G]')

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org