Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-03-20 21:28:29 +0300
committernachoparker <nacho@ownyourbits.com>2018-03-20 21:30:16 +0300
commit062438b7e3e823936e45d94f8ac1174c1c70cef9 (patch)
tree08e85863e9cba3cb754b8048e1f55a80334dbafc
parente471e7b8bf21114e5d4c26a6b7e086dbd3c2ca04 (diff)
NFS: check user and group existencev0.53.5
-rw-r--r--changelog.md6
-rw-r--r--etc/nextcloudpi-config.d/NFS.sh2
-rw-r--r--ncp-web/ncp-launcher.php2
3 files changed, 7 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 26a63e9c..b26daf85 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v0.53.4](https://github.com/nextcloud/nextcloudpi/commit/2e5443e) (2018-03-18) nc-ramlogs: fix enabled by default upon installoation
+[v0.53.5](https://github.com/nextcloud/nextcloudpi/commit/49734e3) (2018-03-20) NFS: check user and group existence
+
+[v0.53.4 ](https://github.com/nextcloud/nextcloudpi/commit/5192766) (2018-03-18) nc-ramlogs: fix enabled by default upon installoation
[v0.53.3 ](https://github.com/nextcloud/nextcloudpi/commit/2f7aa40) (2018-03-17) docker: fix development container script folder
@@ -13,7 +15,7 @@
[v0.52.1 ](https://github.com/nextcloud/nextcloudpi/commit/974da0f) (2018-03-16) docker: include nc-webui
-[v0.52.0](https://github.com/nextcloud/nextcloudpi/commit/3ff4e9d) (2018-03-12) added nc-rsync-auto
+[v0.52.0 ](https://github.com/nextcloud/nextcloudpi/commit/3ff4e9d) (2018-03-12) added nc-rsync-auto
[v0.51.0 ](https://github.com/nextcloud/nextcloudpi/commit/2566e44) (2018-03-12) added nc-rsync
diff --git a/etc/nextcloudpi-config.d/NFS.sh b/etc/nextcloudpi-config.d/NFS.sh
index 7b990cf3..81acf758 100644
--- a/etc/nextcloudpi-config.d/NFS.sh
+++ b/etc/nextcloudpi-config.d/NFS.sh
@@ -80,6 +80,8 @@ configure()
# CHECKS
################################
+ id "$USER_" &>/dev/null || { echo "user USER_ does not exist" ; return 1; }
+ id -g "$GROUP_" &>/dev/null || { echo "group GROUP_ does not exist"; return 1; }
[ -d "$DIR_" ] || { echo -e "INFO: directory $DIR_ does not exist. Creating"; mkdir -p "$DIR_"; }
[[ $( stat -fc%d / ) == $( stat -fc%d $DIR_ ) ]] && \
echo -e "INFO: mounting a in the SD card\nIf you want to use an external mount, make sure it is properly set up"
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php
index 829c39ef..aba9b985 100644
--- a/ncp-web/ncp-launcher.php
+++ b/ncp-web/ncp-launcher.php
@@ -118,7 +118,7 @@ else if ( $_POST['action'] == "launch" && $_POST['config'] )
{
$value = "[". join(",", $value) ."]";
}
- preg_match( '/^[\[\]\w.,@_\/-:]+$/' , $value , $matches )
+ preg_match( '/^[\[\]\w-.,@_\/:]+$/' , $value , $matches )
or exit( '{ "output": "Invalid input" , "token": "' . getCSRFToken() . '" }' );
$code = preg_replace( '/\n' . $name . '_=.*' . PHP_EOL . '/' ,
PHP_EOL . $name . '_=' . $value . PHP_EOL ,