pkemkes / ctf-challenges

CTF challenges I created with instructions to run them yourself
MIT License
3 stars 1 forks source link

Reset of stonks broken #23

Open pkemkes opened 5 months ago

pkemkes commented 5 months ago

Since the change of the user_data directory, we get the following error when trying to reset the app via /reset-....

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/stonks-boerse/src/app/views.py", line 126, in reset
    os.remove(os.path.join(USER_DATA_DIR, f))
IsADirectoryError: [Errno 21] Is a directory: '/var/www/user_data/lost+found'