Closed Bug 521799 Opened 10 years ago Closed 10 years ago

Non-alphanumeric character in group search query outputs MySQL error

Categories

(Participation Infrastructure :: Phonebook, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Milos, Unassigned)

References

()

Details

STR:

1. Goto http://dev.trellon.org/mozcrm/crm/groups-directory
2. In group search box type in asterisk (*) and hit enter key

Output:

# You must include at least one positive keyword with 3 characters or more.
# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((n' at line 1 query: SELECT COUNT(*) FROM ( INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 33 AND na.realm = 'workflow_access_owner') OR (na.gid = 0 AND na.realm = 'og_public')))) count_alias in /ebs/vhosts/dev.trellon.org/httpdocs/mozcrm/crm/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1049.
# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((n' at line 1 query: INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 33 AND na.realm = 'workflow_access_owner') OR (na.gid = 0 AND na.realm = 'og_public'))) LIMIT 0, 20 in /ebs/vhosts/dev.trellon.org/httpdocs/mozcrm/crm/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1075
I am not getting this error.  I get the following message when I put in an asterisk:

"You must include at least one positive keyword with 3 characters or more."

* Can someone else confirm?
* What should be done about this notice?  Is it alright the way it is?  Do you want to support an asterisk?
I can confirm that I get the same error as Milos; As for what should be done, probably shouldn't output a SQL error. That's not a production server though so maybe some debug option is in play?
I can still reproduce it.

(In reply to comment #1)
> I am not getting this error.  I get the following message when I put in an
> asterisk:
> 
> "You must include at least one positive keyword with 3 characters or more."
> 
> * Can someone else confirm?
> * What should be done about this notice?  Is it alright the way it is?  Do you
> want to support an asterisk?

Just open this link:

http://dev.trellon.org/mozcrm/crm/groups-directory?keywords=*
Please include =* in the url, because bugzilla obviously cannot include it as url param.
Or, again, use the url from URL FIELD of this bug. 

PS. Sorry for spamming.
I can also reproduce this for any sort of non-alphanumeric characters, like #### or %%%% or @@@@.
Summary: Asterisk in group search query outputs MySQL error → Non-alphanumeric character in group search query outputs MySQL error
Marking this resolved/fixed, as I can't reproduce it anymore. If someones can, please reopen this bug.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Using your url (on moz stage) I can not reproduce this. Calling FIXED.
Status: RESOLVED → VERIFIED
Component: mozillians.org → Phonebook
Product: Websites → Community Tools
QA Contact: mozillians-org → phonebook
Version: unspecified → other
You need to log in before you can comment on or make changes to this bug.