From 89b4cdebef2c16ed52baabd333bad8742d8de04e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 16:58:07 +0000 Subject: [PATCH] Revert CIFS path validation to IP-only per maintainer request Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- .templates/00-smb_mounts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index f31693e43..50d902710 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -237,7 +237,7 @@ if bashio::config.has_value 'networkdisks'; then fi if [[ "$FSTYPE" == "cifs" ]]; then - server="$(echo "$disk" | sed -E 's|^//([^/]+)/.*|\1|')" + server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | head -n 1)" else server="${disk%%:*}" fi @@ -264,8 +264,8 @@ if bashio::config.has_value 'networkdisks'; then echo "... mounting ($FSTYPE) $disk" if [[ "$FSTYPE" == "cifs" ]]; then - if [[ ! "$disk" =~ ^//[^/]+/.+ ]]; then - bashio::log.fatal "...... invalid CIFS path \"$disk\". Use //server/sharedfolder or //123.12.12.12/sharedfolder" + if [[ ! "$disk" =~ ^//[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/.+ ]]; then + bashio::log.fatal "...... invalid CIFS path \"$disk\". Use //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2" echo "Invalid CIFS path structure: $disk" >"$ERRORCODE_FILE" || true continue fi