home » zplus/freepost.git
Author zPlus <zplus@peers.community> 2019-03-19 07:10:45
Committer zPlus <zplus@peers.community> 2019-03-19 07:10:45
Commit c0a38b3 (patch)
Tree af90034
Parent(s)

Fix database REGEXP function. Use re.search() instead of re.match().


commits diff: 8b6922c..c0a38b3
1 file changed, 1 insertion, 1 deletiondownload


Diffstat
-rw-r--r-- freepost/database.py 2

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+1/-1 M   freepost/database.py
index d1c0ef2..d7133ba
old size: 21K - new size: 21K
@@ -19,7 +19,7 @@ db.create_function('SHA512', 1, lambda text:
19 19 # function named "regexp" is added at run-time, then the "X REGEXP Y" operator
20 20 # will be implemented as a call to "regexp(Y,X)".
21 21 db.create_function('REGEXP', 2, lambda pattern, string:
22 - re.match(pattern, string, flags=re.IGNORECASE) is not None)
22 + re.search(pattern, string, flags=re.IGNORECASE) is not None)
23 23
24 24 # Store a new session_id for a user that has logged in
25 25 # The session token is stored in the user cookies during login, here