Univention Bugzilla – Attachment 10020 Details for
Bug 49445
sql injection in remove_s4_rejected.py
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
49445.patch (text/plain), 1.89 KB, created by
Florian Best
on 2019-05-10 11:50 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-05-10 11:50 CEST
Size:
1.89 KB
patch
obsolete
>diff --git a/services/univention-s4-connector/scripts/remove_s4_rejected.py b/services/univention-s4-connector/scripts/remove_s4_rejected.py >index 42721a37fd..0ff6a59ffe 100755 >--- a/services/univention-s4-connector/scripts/remove_s4_rejected.py >+++ b/services/univention-s4-connector/scripts/remove_s4_rejected.py >@@ -43,11 +43,11 @@ class ObjectNotFound(BaseException): > def remove_s4_rejected(s4_dn): > cache_db = sqlite3.connect('/etc/univention/connector/s4internal.sqlite') > c = cache_db.cursor() >- c.execute("SELECT key FROM 'S4 rejected' WHERE value='%s'" % s4_dn) >+ c.execute("SELECT key FROM 'S4 rejected' WHERE value=?", [unicode(s4_dn)]) > key = c.fetchone() > if not key: > raise ObjectNotFound >- c.execute("DELETE FROM 'S4 rejected' WHERE value='%s'" % s4_dn) >+ c.execute("DELETE FROM 'S4 rejected' WHERE value=?", [unicode(s4_dn)]) > cache_db.commit() > cache_db.close() > >diff --git a/services/univention-s4-connector/scripts/remove_ucs_rejected.py b/services/univention-s4-connector/scripts/remove_ucs_rejected.py >index f9b1de4740..dc26e9ba75 100755 >--- a/services/univention-s4-connector/scripts/remove_ucs_rejected.py >+++ b/services/univention-s4-connector/scripts/remove_ucs_rejected.py >@@ -44,7 +44,7 @@ class ObjectNotFound(BaseException): > def remove_ucs_rejected(ucs_dn): > cache_db = sqlite3.connect('/etc/univention/connector/s4internal.sqlite') > c = cache_db.cursor() >- c.execute("SELECT key FROM 'UCS rejected' WHERE value='%s'" % ucs_dn) >+ c.execute("SELECT key FROM 'UCS rejected' WHERE value=?" % [unicode(ucs_dn)]) > filenames = c.fetchall() > if not filenames: > raise ObjectNotFound >@@ -52,7 +52,7 @@ def remove_ucs_rejected(ucs_dn): > if filename: > if os.path.exists(filename[0]): > os.remove(filename[0]) >- c.execute("DELETE FROM 'UCS rejected' WHERE value='%s'" % ucs_dn) >+ c.execute("DELETE FROM 'UCS rejected' WHERE value=?" % [unicode(ucs_dn)]) > cache_db.commit() > cache_db.close() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 49445
: 10020