mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 07:54:14 +00:00
Some injection fixes (#39642)
Fixes a breaking error and possible injection exploit in populate_key_2018-07-09.py caused by a key existing from when byond allowed now blocked characters like ' in usernames e.g. http://www.byond.com/members/immortaljrosh?format=text Additionally fixes some unsanitized values in other queries.
This commit is contained in:
@@ -78,7 +78,7 @@ for current_ckey in ckey_list:
|
||||
else:
|
||||
print(msg)
|
||||
continue
|
||||
cursor.execute("UPDATE {0} SET byond_key = \'{1}\' WHERE ckey = \'{2}\'".format(player_table, key, current_ckey[0]))
|
||||
cursor.execute("UPDATE {0} SET byond_key = %s WHERE ckey = %s".format(player_table), (key, current_ckey[0]))
|
||||
db.commit()
|
||||
end_time = datetime.now()
|
||||
print("Script completed at {0} with duration {1}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), end_time - start_time))
|
||||
|
||||
Reference in New Issue
Block a user