From 945061311b3844270a4903d63b6e8978c2c9bd5d Mon Sep 17 00:00:00 2001 From: dsmic Date: Tue, 20 Oct 2020 02:31:55 +0200 Subject: nc-info: fixed api change for portchecker (#1194) Signed-off-by: detlef --- bin/ncp-diag | 5 ++++- changelog.md | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/ncp-diag b/bin/ncp-diag index ce572daa..4d2d0fc9 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -65,9 +65,12 @@ echo "internet check|$( ping -W 2 -w 1 -q github.com &>/dev/null && echo ok || e function is_port_open() { PORT=$1 - wget -T2 -t1 -q https://portchecker.co --post-data "port=$PORT" -O - \ + tmp_file=$(mktemp) + v=$(wget -T2 -t1 -q --keep-session-cookies --save-cookies $tmp_file https://portchecker.co -O - | grep -oP "_csrf\" value=\"\K.*\"") + wget -T2 -t1 -q --load-cookies $tmp_file https://portchecker.co --post-data "port=$PORT&_csrf=${v::-1}" -O - \ | grep -q 'open' && { echo "open"; return 1; } echo "closed" + rm $tmp_file } echo "port check 80|$( is_port_open 80 )" diff --git a/changelog.md b/changelog.md index a3f1d155..8517e0fe 100644 --- a/changelog.md +++ b/changelog.md @@ -1,11 +1,13 @@ -[v1.30.0](https://github.com/nextcloud/nextcloudpi/commit/bb96f7a) (2020-09-19) upgrade to NC19.0.2 +[v1.30.1](https://github.com/nextcloud/nextcloudpi/commit/fab4457) (2020-10-20) nc-info: fixed api change for portchecker (#1194) + +[v1.30.0](https://github.com/nextcloud/nextcloudpi/commit/f00fe21) (2020-09-19) upgrade to NC19.0.2 [v1.29.10](https://github.com/nextcloud/nextcloudpi/commit/82baebf) (2020-09-03) ncp-web: added a lot of german locales [v1.29.9 ](https://github.com/nextcloud/nextcloudpi/commit/3706ed0) (2020-09-12) nc-previews: fix killing generate-all -[v1.29.8](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk) +[v1.29.8, master](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk) [v1.29.6 ](https://github.com/nextcloud/nextcloudpi/commit/14b78e3) (2020-08-29) ncp-web: Fix the style of the language selection dropdown (chrome) -- cgit v1.2.3