Closed NCNeo closed 3 months ago
This looks to be a duplicate of https://github.com/guardicore/monkey/issues/3807. Please make sure your username does not contain any characters other than [A-Za-z0-9].
This is fixed on the develop
branch and will make its way to users in the next release.
Describe the bug
A clear and concise description of what the bug is. when run appllication and make the registration process, get loop register, when see the backend get this error message
2024-07-28 11:46:18,782 - INFO - server_setup.py:189 - _start_island_server() - Using certificate path: /tmp/.mount_InfectZiPKT8/usr/src/monkey_island/cc/server.crt, and key path: /tmp/.mount_InfectZiPKT8/usr/src/monkey_island/cc/server.key. 2024-07-28 11:46:18,782 - INFO - server_setup.py:226 - _log_init_info() - Monkey Island Server is running! 2024-07-28 11:46:18,782 - INFO - server_setup.py:227 - _log_init_info() - version: 2.3.0 2024-07-28 11:46:18,782 - INFO - server_setup.py:234 - _log_web_interface_access_urls() - To access the web interface, navigate to one of the the following URLs using your browser: https://192.168.68.153:5000 2024-07-28 11:46:19,458 - DEBUG - connectionpool.py:473 - _make_request() - https://m15mjynko3.execute-api.us-east-1.amazonaws.com:443 "GET /default?version=2.3.0&deployment=appimage HTTP/1.1" 200 75 2024-07-28 11:46:19,462 - INFO - server_setup.py:249 - _inner() - Version number and deployment type was sent to analytics server. The response is: Deployment: appimage and version: 2.3.0 was sent to the analytics server. 2024-07-28 11:46:20,426 - DEBUG - aws_metadata.py:31 - fetch_aws_instance_metadata() - Failed init of AWSInstance while getting metadata: HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7efee55cc690>, 'Connection to 169.254.169.254 timed out. (connect timeout=2)')) 2024-07-28 11:46:22,978 - WARNING - gevent_hub_error_handler.py:25 - call() - gevent caught an exception: ['ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1006)\n'] 2024-07-28 11:46:24,084 - WARNING - gevent_hub_error_handler.py:25 - call() - gevent caught an exception: ['ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1006)\n'] 2024-07-28 11:46:24,588 - INFO - pywsgi.py:1226 - write() - 192.168.68.153 - "GET /api/agent-plugins/available/index HTTP/1.1" 401 233 0.001205 2024-07-28 11:46:28,578 - ERROR - app.py:1744 - log_exception() - Exception on /api/register [POST] Traceback (most recent call last): File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_restful/init.py", line 489, in wrapper resp = resource(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask/views.py", line 107, in view return current_app.ensure_sync(self.dispatch_request)(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_restful/init.py", line 604, in dispatch_request resp = meth(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/usr/src/monkey_island/cc/services/authentication_service/flask_resources/utils.py", line 41, in decorated_function return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/usr/src/monkey_island/cc/services/authentication_service/flask_resources/register.py", line 43, in post response: ResponseValue = register() ^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_security/decorators.py", line 622, in wrapper return f(args, kwargs) ^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_security/views.py", line 294, in register if form.validate_on_submit(): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_wtf/form.py", line 86, in validate_on_submit return self.is_submitted() and self.validate(extra_validators=extra_validators) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_security/forms.py", line 612, in validate if not super().validate(kwargs): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/wtforms/form.py", line 329, in validate return super().validate(extra) ^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/wtforms/form.py", line 146, in validate if not field.validate(self, extra): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/wtforms/fields/core.py", line 242, in validate stop_validation = self._run_validation_chain(form, chain) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/wtforms/fields/core.py", line 262, in _run_validation_chain validator(form, self) File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_security/forms.py", line 212, in unique_username form.existing_username_user = _datastore.find_user( ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/flask_security/datastore.py", line 898, in find_user obj = self.user_model.objects(**query).first() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/.mount_InfectZiPKT8/opt/python3.11/lib/python3.11/site-packages/mongoengine/queryset/base.py", line 296, in first result = queryset[0]