Project

General

Profile

Bug #6735

Escape MySQL wildcards characters in admin > user list advanced search form

Added by Hubert Borderiou over 6 years ago. Updated almost 6 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Users/Groups
Target version:
Start date:
02/10/2013
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hi,
in the Admin > User list > Advanced search
mysql wirldcards characters % and _ are not escaped (like it is in the User tool of a course)

For example, if we search username "ext_" in the form, we have username "exterieur" , because _ is a SQL wildcard.


Files

6735_1.png (97.5 KB) 6735_1.png Daniel Barreto, 10/04/2014 21:38
6735_2.png (33.3 KB) 6735_2.png Daniel Barreto, 10/04/2014 21:38
6735_3.png (17.7 KB) 6735_3.png Daniel Barreto, 10/04/2014 21:38

Associated revisions

Revision f6789063 (diff)
Added by Hubert Borderiou over 6 years ago

Escape sql wildcards % and _ in admin > user_list > advanced search - ref #6735

Revision 3d68443e (diff)
Added by Diego E almost 6 years ago

user_list: Escape SQL wildcards in simple search

The "keyword" parameter was missing a ::escape_sql_wildcards call, to
filter it correctly, like the other parameters.

Refs #6735

History

#1

Updated by Hubert Borderiou over 6 years ago

  • Status changed from New to Needs testing
  • Estimated time set to 2.00 h
#2

Updated by Julio Montoya over 6 years ago

  • Status changed from Needs testing to Needs more info

Maybe is better to use "*" as a wildcard instead of "_". The "_" character can be use in the username, so it can mess the search if you're looking for a user that has an username like "julio_".

#3

Updated by Julio Montoya over 6 years ago

I don't know which character is better known as a wildcard for non tech users ...

#4

Updated by Hubert Borderiou over 6 years ago

I guess we can have no wildcard for the moment.

#5

Updated by Hubert Borderiou over 6 years ago

  • Target version set to 1.9.8
#6

Updated by Diego E almost 6 years ago

#7

Updated by Diego E almost 6 years ago

  • Status changed from Needs more info to Bug resolved
  • % Done changed from 0 to 100

Done in 1.9.x

#8

Updated by Yannick Warnier almost 6 years ago

  • Status changed from Bug resolved to Needs testing
  • % Done changed from 100 to 80

Diego, you cannot provide a fix and mark the issue as "resolved" all by yourself (that's our quality procedure). Someone else has to review the effectiveness of your fix.

#9

Updated by Yannick Warnier almost 6 years ago

  • Assignee set to Daniel Barreto
#10

Updated by Daniel Barreto almost 6 years ago

Tested and working, here a pictures

The list of users:

'_' character:

'%' character:

Also available in: Atom PDF