matlab-proxy 0.15.0__py3-none-any.whl → 0.15.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matlab-proxy might be problematic. Click here for more details.
- matlab_proxy/app.py +13 -7
- matlab_proxy/gui/asset-manifest.json +3 -3
- matlab_proxy/gui/index.html +1 -1
- matlab_proxy/gui/static/js/{main.14aa7840.js → main.ff1bfd69.js} +3 -3
- matlab_proxy/gui/static/js/main.ff1bfd69.js.map +1 -0
- matlab_proxy/util/__init__.py +8 -1
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/METADATA +1 -1
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/RECORD +34 -14
- tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +3 -0
- tests/unit/__init__.py +1 -0
- tests/unit/conftest.py +67 -0
- tests/unit/test_app.py +1113 -0
- tests/unit/test_app_state.py +582 -0
- tests/unit/test_constants.py +5 -0
- tests/unit/test_ddux.py +22 -0
- tests/unit/test_devel.py +246 -0
- tests/unit/test_non_dev_mode.py +169 -0
- tests/unit/test_settings.py +460 -0
- tests/unit/util/__init__.py +3 -0
- tests/unit/util/mwi/__init__.py +1 -0
- tests/unit/util/mwi/embedded_connector/__init__.py +1 -0
- tests/unit/util/mwi/embedded_connector/test_helpers.py +29 -0
- tests/unit/util/mwi/embedded_connector/test_request.py +64 -0
- tests/unit/util/mwi/test_custom_http_headers.py +281 -0
- tests/unit/util/mwi/test_logger.py +49 -0
- tests/unit/util/mwi/test_token_auth.py +289 -0
- tests/unit/util/mwi/test_validators.py +331 -0
- tests/unit/util/test_mw.py +550 -0
- tests/unit/util/test_util.py +135 -0
- matlab_proxy/gui/static/js/main.14aa7840.js.map +0 -1
- /matlab_proxy/gui/static/js/{main.14aa7840.js.LICENSE.txt → main.ff1bfd69.js.LICENSE.txt} +0 -0
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/LICENSE.md +0 -0
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/WHEEL +0 -0
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/entry_points.txt +0 -0
- {matlab_proxy-0.15.0.dist-info → matlab_proxy-0.15.1.dist-info}/top_level.txt +0 -0
matlab_proxy/app.py
CHANGED
|
@@ -4,6 +4,7 @@ import asyncio
|
|
|
4
4
|
import json
|
|
5
5
|
import mimetypes
|
|
6
6
|
import pkgutil
|
|
7
|
+
import secrets
|
|
7
8
|
import sys
|
|
8
9
|
import uuid
|
|
9
10
|
|
|
@@ -795,6 +796,18 @@ def configure_and_start(app):
|
|
|
795
796
|
|
|
796
797
|
web_logger = None if not mwi_env.is_web_logging_enabled() else logger
|
|
797
798
|
|
|
799
|
+
# Setup the session storage,
|
|
800
|
+
# Uniqified per session to prevent multiple proxy servers on the same FQDN from interfering with each other.
|
|
801
|
+
uniqify_session_cookie = secrets.token_hex()
|
|
802
|
+
fernet_key = fernet.Fernet.generate_key()
|
|
803
|
+
f = fernet.Fernet(fernet_key)
|
|
804
|
+
aiohttp_session_setup(
|
|
805
|
+
app,
|
|
806
|
+
EncryptedCookieStorage(
|
|
807
|
+
f, cookie_name="matlab-proxy-session-" + uniqify_session_cookie
|
|
808
|
+
),
|
|
809
|
+
)
|
|
810
|
+
|
|
798
811
|
# Setup runner
|
|
799
812
|
runner = web.AppRunner(app, logger=web_logger, access_log=web_logger)
|
|
800
813
|
loop.run_until_complete(runner.setup())
|
|
@@ -870,13 +883,6 @@ def create_app(config_name=matlab_proxy.get_default_config_name()):
|
|
|
870
883
|
app.router.add_route("*", f"{base_url}/{{proxyPath:.*}}", matlab_view)
|
|
871
884
|
app.on_cleanup.append(cleanup_background_tasks)
|
|
872
885
|
|
|
873
|
-
# Setup the session storage
|
|
874
|
-
fernet_key = fernet.Fernet.generate_key()
|
|
875
|
-
f = fernet.Fernet(fernet_key)
|
|
876
|
-
aiohttp_session_setup(
|
|
877
|
-
app, EncryptedCookieStorage(f, cookie_name="matlab-proxy-session")
|
|
878
|
-
)
|
|
879
|
-
|
|
880
886
|
return app
|
|
881
887
|
|
|
882
888
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.47712126.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.ff1bfd69.js",
|
|
5
5
|
"static/media/mathworks-pictograms.svg?20181009": "./static/media/mathworks-pictograms.f6f087b008b5a9435f26.svg",
|
|
6
6
|
"static/media/MATLAB-env-blur.png": "./static/media/MATLAB-env-blur.4fc94edbc82d3184e5cb.png",
|
|
7
7
|
"static/media/mathworks.svg?20181004": "./static/media/mathworks.80a3218e1ba29f0573fb.svg",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"static/media/gripper.svg": "./static/media/gripper.9defbc5e76d0de8bb6e0.svg",
|
|
36
36
|
"static/media/arrow.svg": "./static/media/arrow.0c2968b90bd9a64c8c3f.svg",
|
|
37
37
|
"main.47712126.css.map": "./static/css/main.47712126.css.map",
|
|
38
|
-
"main.
|
|
38
|
+
"main.ff1bfd69.js.map": "./static/js/main.ff1bfd69.js.map"
|
|
39
39
|
},
|
|
40
40
|
"entrypoints": [
|
|
41
41
|
"static/css/main.47712126.css",
|
|
42
|
-
"static/js/main.
|
|
42
|
+
"static/js/main.ff1bfd69.js"
|
|
43
43
|
]
|
|
44
44
|
}
|
matlab_proxy/gui/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.ff1bfd69.js"></script><link href="./static/css/main.47712126.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|