tags with periods break url access (probably also other regex significant chars?)

UNCONFIRMED
Assigned to

Status

UNCONFIRMED
9 years ago
9 years ago

People

(Reporter: nharkins, Assigned: gregaryh)

Tracking

Details

(URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11
Build Identifier: Bugzilla 3.0.8 w/ Testopia 2.2


Software error:

DBD::Pg::db selectcol_arrayref failed: ERROR:  syntax error at or near "fixed_on_p4"
LINE 1: ...) WHERE ((test_tags.tag_name  ~*  '(^|[^a-z0-9])E'fixed_on_p...
                                                             ^ [for Statement "SELECT DISTINCT test_cases.case_id FROM test_cases  INNER JOIN test_case_tags  AS case_tags ON (test_cases.case_id = case_tags.case_id) INNER JOIN test_tags ON (case_tags.tag_id = test_tags.tag_id) WHERE ((test_tags.tag_name  ~*  '(^|[^a-z0-9])E'fixed_on_p4\\\\\\.5($|[^a-z0-9])'))"] at /var/www/virts/bugs/Bugzilla/Testopia/Table.pm line 118
        Bugzilla::Testopia::Table::init('Bugzilla::Testopia::Table=HASH(0x7fa5eb544708)', 'case', 'tr_list_cases.cgi', 'Bugzilla::CGI=HASH(0x7fa5eb3455a8)', undef, 'SELECT DISTINCT test_cases.case_id FROM test_cases  INNER JOI...') called at /var/www/virts/bugs/Bugzilla/Testopia/Table.pm line 88
        Bugzilla::Testopia::Table::new('Bugzilla::Testopia::Table', 'case', 'tr_list_cases.cgi', 'Bugzilla::CGI=HASH(0x7fa5eb3455a8)', undef, 'SELECT DISTINCT test_cases.case_id FROM test_cases  INNER JOI...') called at /var/www/virts/bugs/tr_list_cases.cgi line 306
        ModPerl::ROOT::Bugzilla::ModPerl::ResponseHandler::var_www_virts_bugs_tr_list_cases_2ecgi::handler('Apache2::RequestRec=SCALAR(0x7fa5e6f3cdc0)') called at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm line 204
        eval {...} called at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm line 204
        ModPerl::RegistryCooker::run('Bugzilla::ModPerl::ResponseHandler=HASH(0x7fa5eb356c60)') called at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm line 170
        ModPerl::RegistryCooker::default_handler('Bugzilla::ModPerl::ResponseHandler=HASH(0x7fa5eb356c60)') called at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/ModPerl/Registry.pm line 31
        ModPerl::Registry::handler('Bugzilla::ModPerl::ResponseHandler', 'Apache2::RequestRec=SCALAR(0x7fa5e6f3cdc0)') called at /var/www/virts/bugs/mod_perl.pl line 96
        Bugzilla::ModPerl::ResponseHandler::handler('Bugzilla::ModPerl::ResponseHandler', 'Apache2::RequestRec=SCALAR(0x7fa5e6f3cdc0)') called at -e line 0
        eval {...} called at -e line 0


Reproducible: Always

Steps to Reproduce:
1. create a tag with a '.' in it.
2. assign several cases to it.
3. try to access it via "/tr_list_cases.cgi?tags=..."

Actual Results:  
error output pasted above into "details" section.

Expected Results:  
either: 
a) don't allow any such tags to be created, i.e. limit allowable chars in tags.
or:
b) escape such chars to properly search in sql.
You need to log in before you can comment on or make changes to this bug.