Fix 2 DOS vulns, improve Onionr efficiency
This commit is contained in:
parent
9e9595b4ec
commit
1a6fa19323
2 changed files with 10 additions and 3 deletions
|
@ -469,7 +469,7 @@ class Onionr:
|
|||
with open(plugins.get_plugins_folder(plugin_name) + '/main.py', 'a') as main:
|
||||
contents = ''
|
||||
with open('static-data/default_plugin.py', 'rb') as file:
|
||||
contents = file.read()
|
||||
contents = file.read().decode()
|
||||
|
||||
# TODO: Fix $user. os.getlogin() is B U G G Y
|
||||
main.write(contents.replace('$user', 'some random developer').replace('$date', datetime.datetime.now().strftime('%Y-%m-%d')).replace('$name', plugin_name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue