From 4ff67ccc57516abb7522850dfb37c9b512d95f80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:52:07 +0200 Subject: [PATCH 1/3] Bump fastapi[standard] from 0.115.0 to 0.115.2 (#950) Bumps [fastapi[standard]](https://github.com/fastapi/fastapi) from 0.115.0 to 0.115.2. - [Release notes](https://github.com/fastapi/fastapi/releases) - [Commits](https://github.com/fastapi/fastapi/compare/0.115.0...0.115.2) --- updated-dependencies: - dependency-name: fastapi[standard] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docker/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/requirements.txt b/docker/requirements.txt index fb664ab27..9f593b48a 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,7 +1,7 @@ gunicorn==23.0.0 psycopg[binary]==3.2.3 psycopg_pool==3.2.3 -fastapi[standard]==0.115.0 +fastapi[standard]==0.115.2 starlette>=0.35 uvicorn[standard]==0.31.1 pandas==2.2.3 From 67b1da250fb961b74abdd3ca01a3880dd54132ef Mon Sep 17 00:00:00 2001 From: Arne Tarara Date: Mon, 14 Oct 2024 15:02:02 +0200 Subject: [PATCH 2/3] Wrong user authentication token was set --- frontend/js/helpers/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/js/helpers/main.js b/frontend/js/helpers/main.js index b79fae8e0..6b5055e84 100644 --- a/frontend/js/helpers/main.js +++ b/frontend/js/helpers/main.js @@ -193,8 +193,8 @@ async function makeAPICall(path, values=null, force_authentication_token=null) { options.headers['X-Authentication'] = force_authentication_token; } else { const authentication_token = localStorage.getItem('authentication_token'); - if (force_authentication_token != null && force_authentication_token != '') { - options.headers['X-Authentication'] = force_authentication_token; + if (authentication_token != null && authentication_token != '') { + options.headers['X-Authentication'] = authentication_token; } } From d098fa173d67e917d51742d66eca0c28c18a29e3 Mon Sep 17 00:00:00 2001 From: Arne Tarara Date: Mon, 14 Oct 2024 15:10:11 +0200 Subject: [PATCH 3/3] (fix): Typo in system-site-packages; Clearer display --- lib/install_shared.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/install_shared.sh b/lib/install_shared.sh index 6722da4ae..c288c2662 100644 --- a/lib/install_shared.sh +++ b/lib/install_shared.sh @@ -166,7 +166,7 @@ function prepare_config() { function setup_python() { print_message "Setting up python venv" if [[ $use_system_site_packages == true ]] ; then - python3 -m venv venv --system_site_packages + python3 -m venv venv --system-site-packages else python3 -m venv venv fi @@ -316,14 +316,17 @@ while getopts "p:a:m:nhtbisyrlc:k:" o; do done if [[ $ask_ssl == true ]] ; then + echo "" read -p "Do you want to enable SSL for the API and frontend? (y/N) : " enable_ssl_input if [[ "$enable_ssl_input" == "Y" || "$enable_ssl_input" == "y" ]] ; then enable_ssl=true if [[ -z $cert_key ]]; then + echo "" read -p "Please type your file where your key is located. For instance /home/me/key.pem : " cert_key fi cp $cert_key docker/nginx/ssl/production.key if [[ -z $cert_file ]]; then + echo "" read -p "Please type your file where your certificate is located. For instance /home/me/cert.crt : " cert_file fi cp $cert_file docker/nginx/ssl/production.crt @@ -334,12 +337,16 @@ fi if [[ -z $api_url ]] ; then - read -p "Please enter the desired API endpoint URL: (default: http://api.green-coding.internal:9142): " api_url + echo "" + echo "Please enter the desired API endpoint URL" + read -p "Use port 9142 for local installs and no port for production to auto-use 80/443: (default: http://api.green-coding.internal:9142): " api_url api_url=${api_url:-"http://api.green-coding.internal:9142"} fi if [[ -z $metrics_url ]] ; then - read -p "Please enter the desired metrics dashboard URL: (default: http://metrics.green-coding.internal:9142): " metrics_url + echo "" + echo "Please enter the desired metrics dashboard URL" + read -p "Use port 9142 for local installs and no port for production to auto-use 80/443: (default: http://metrics.green-coding.internal:9142): " metrics_url metrics_url=${metrics_url:-"http://metrics.green-coding.internal:9142"} fi @@ -351,6 +358,7 @@ fi default_password=${password_from_file:-$(generate_random_password 12)} if [[ -z "$db_pw" ]] ; then + echo "" read -sp "Please enter the new password to be set for the PostgreSQL DB (default: $default_password): " db_pw echo "" # force a newline, because read -sp will consume it db_pw=${db_pw:-"$default_password"}