Skip to content

Commit

Permalink
apps: bump library (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k authored Dec 23, 2024
1 parent 269607e commit 7934880
Show file tree
Hide file tree
Showing 7,550 changed files with 62,764 additions and 62,008 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions ix-dev/community/actual-budget/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/actual-budget/icons/icon.png
keywords:
- finance
- budget
lib_version: 2.1.5
lib_version_hash: 94754830801a8fa90e04e35d324a34a51b90d5919e544ebc1018e065adb02a12
lib_version: 2.1.6
lib_version_hash: 84c965e8b9bea696765ab62b8ee3238162fe7807d0f0a61cf9c153994a47fa90
maintainers:
- email: dev@ixsystems.com
name: truenas
Expand All @@ -32,4 +32,4 @@ sources:
- https://hub.docker.com/r/actualbudget/actual-server
title: Actual Budget
train: community
version: 1.2.6
version: 1.2.7
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def test_is_allowed_path_direct(test_path, expected):
assert is_allowed_path(test_path) == expected


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_ix_volume():
"""Test that IX volumes are not allowed"""
assert is_allowed_path("/mnt/.ix-apps/something", True)


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_symlink(tmp_path):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def valid_fs_path_or_raise(path: str):
return path


def is_allowed_path(input_path: str) -> bool:
def is_allowed_path(input_path: str, is_ix_volume: bool = False) -> bool:
"""
Validates that the given path (after resolving symlinks) is not
one of the restricted paths or within those restricted directories.
Expand All @@ -159,15 +159,15 @@ def is_allowed_path(input_path: str) -> bool:
"""
# Resolve the path to avoid symlink bypasses
real_path = Path(input_path).resolve()
for restricted in RESTRICTED:
for restricted in RESTRICTED if not is_ix_volume else [r for r in RESTRICTED if r != Path("/mnt/.ix-apps")]:
if real_path.is_relative_to(restricted):
return False

return real_path not in RESTRICTED_IN


def allowed_fs_host_path_or_raise(path: str):
if not is_allowed_path(path):
def allowed_fs_host_path_or_raise(path: str, is_ix_volume: bool = False):
if not is_allowed_path(path, is_ix_volume):
raise RenderError(f"Path [{path}] is not allowed to be mounted.")
return path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, render_instance: "Render", config: "IxStorageIxVolumeConfig")
)

path = valid_fs_path_or_raise(ix_volumes[dataset_name].rstrip("/"))
self.source = allowed_fs_host_path_or_raise(path)
self.source = allowed_fs_host_path_or_raise(path, True)

def get(self):
return self.source
Expand Down
6 changes: 3 additions & 3 deletions ix-dev/community/adguard-home/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/adguard-home/icons/icon.svg
keywords:
- dns
- adblock
lib_version: 2.1.5
lib_version_hash: 94754830801a8fa90e04e35d324a34a51b90d5919e544ebc1018e065adb02a12
lib_version: 2.1.6
lib_version_hash: 84c965e8b9bea696765ab62b8ee3238162fe7807d0f0a61cf9c153994a47fa90
maintainers:
- email: dev@ixsystems.com
name: truenas
Expand All @@ -42,4 +42,4 @@ sources:
- https://hub.docker.com/r/adguard/adguardhome
title: AdGuard Home
train: community
version: 1.1.8
version: 1.1.9
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def test_is_allowed_path_direct(test_path, expected):
assert is_allowed_path(test_path) == expected


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_ix_volume():
"""Test that IX volumes are not allowed"""
assert is_allowed_path("/mnt/.ix-apps/something", True)


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_symlink(tmp_path):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def valid_fs_path_or_raise(path: str):
return path


def is_allowed_path(input_path: str) -> bool:
def is_allowed_path(input_path: str, is_ix_volume: bool = False) -> bool:
"""
Validates that the given path (after resolving symlinks) is not
one of the restricted paths or within those restricted directories.
Expand All @@ -159,15 +159,15 @@ def is_allowed_path(input_path: str) -> bool:
"""
# Resolve the path to avoid symlink bypasses
real_path = Path(input_path).resolve()
for restricted in RESTRICTED:
for restricted in RESTRICTED if not is_ix_volume else [r for r in RESTRICTED if r != Path("/mnt/.ix-apps")]:
if real_path.is_relative_to(restricted):
return False

return real_path not in RESTRICTED_IN


def allowed_fs_host_path_or_raise(path: str):
if not is_allowed_path(path):
def allowed_fs_host_path_or_raise(path: str, is_ix_volume: bool = False):
if not is_allowed_path(path, is_ix_volume):
raise RenderError(f"Path [{path}] is not allowed to be mounted.")
return path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, render_instance: "Render", config: "IxStorageIxVolumeConfig")
)

path = valid_fs_path_or_raise(ix_volumes[dataset_name].rstrip("/"))
self.source = allowed_fs_host_path_or_raise(path)
self.source = allowed_fs_host_path_or_raise(path, True)

def get(self):
return self.source
Expand Down
6 changes: 3 additions & 3 deletions ix-dev/community/audiobookshelf/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/audiobookshelf/icons/icon.svg
keywords:
- media
- audiobook
lib_version: 2.1.5
lib_version_hash: 94754830801a8fa90e04e35d324a34a51b90d5919e544ebc1018e065adb02a12
lib_version: 2.1.6
lib_version_hash: 84c965e8b9bea696765ab62b8ee3238162fe7807d0f0a61cf9c153994a47fa90
maintainers:
- email: dev@ixsystems.com
name: truenas
Expand All @@ -33,4 +33,4 @@ sources:
- https://github.com/advplyr/audiobookshelf
title: Audiobookshelf
train: community
version: 1.3.6
version: 1.3.7
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def test_is_allowed_path_direct(test_path, expected):
assert is_allowed_path(test_path) == expected


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_ix_volume():
"""Test that IX volumes are not allowed"""
assert is_allowed_path("/mnt/.ix-apps/something", True)


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_symlink(tmp_path):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def valid_fs_path_or_raise(path: str):
return path


def is_allowed_path(input_path: str) -> bool:
def is_allowed_path(input_path: str, is_ix_volume: bool = False) -> bool:
"""
Validates that the given path (after resolving symlinks) is not
one of the restricted paths or within those restricted directories.
Expand All @@ -159,15 +159,15 @@ def is_allowed_path(input_path: str) -> bool:
"""
# Resolve the path to avoid symlink bypasses
real_path = Path(input_path).resolve()
for restricted in RESTRICTED:
for restricted in RESTRICTED if not is_ix_volume else [r for r in RESTRICTED if r != Path("/mnt/.ix-apps")]:
if real_path.is_relative_to(restricted):
return False

return real_path not in RESTRICTED_IN


def allowed_fs_host_path_or_raise(path: str):
if not is_allowed_path(path):
def allowed_fs_host_path_or_raise(path: str, is_ix_volume: bool = False):
if not is_allowed_path(path, is_ix_volume):
raise RenderError(f"Path [{path}] is not allowed to be mounted.")
return path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, render_instance: "Render", config: "IxStorageIxVolumeConfig")
)

path = valid_fs_path_or_raise(ix_volumes[dataset_name].rstrip("/"))
self.source = allowed_fs_host_path_or_raise(path)
self.source = allowed_fs_host_path_or_raise(path, True)

def get(self):
return self.source
Expand Down
6 changes: 3 additions & 3 deletions ix-dev/community/autobrr/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ keywords:
- media
- torrent
- usenet
lib_version: 2.1.5
lib_version_hash: 94754830801a8fa90e04e35d324a34a51b90d5919e544ebc1018e065adb02a12
lib_version: 2.1.6
lib_version_hash: 84c965e8b9bea696765ab62b8ee3238162fe7807d0f0a61cf9c153994a47fa90
maintainers:
- email: dev@ixsystems.com
name: truenas
Expand All @@ -31,4 +31,4 @@ sources:
- https://github.com/autobrr/autobrr
title: Autobrr
train: community
version: 1.2.8
version: 1.2.9
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def test_is_allowed_path_direct(test_path, expected):
assert is_allowed_path(test_path) == expected


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_ix_volume():
"""Test that IX volumes are not allowed"""
assert is_allowed_path("/mnt/.ix-apps/something", True)


@patch.object(Path, "resolve", mock_resolve)
def test_is_allowed_path_symlink(tmp_path):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def valid_fs_path_or_raise(path: str):
return path


def is_allowed_path(input_path: str) -> bool:
def is_allowed_path(input_path: str, is_ix_volume: bool = False) -> bool:
"""
Validates that the given path (after resolving symlinks) is not
one of the restricted paths or within those restricted directories.
Expand All @@ -159,15 +159,15 @@ def is_allowed_path(input_path: str) -> bool:
"""
# Resolve the path to avoid symlink bypasses
real_path = Path(input_path).resolve()
for restricted in RESTRICTED:
for restricted in RESTRICTED if not is_ix_volume else [r for r in RESTRICTED if r != Path("/mnt/.ix-apps")]:
if real_path.is_relative_to(restricted):
return False

return real_path not in RESTRICTED_IN


def allowed_fs_host_path_or_raise(path: str):
if not is_allowed_path(path):
def allowed_fs_host_path_or_raise(path: str, is_ix_volume: bool = False):
if not is_allowed_path(path, is_ix_volume):
raise RenderError(f"Path [{path}] is not allowed to be mounted.")
return path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, render_instance: "Render", config: "IxStorageIxVolumeConfig")
)

path = valid_fs_path_or_raise(ix_volumes[dataset_name].rstrip("/"))
self.source = allowed_fs_host_path_or_raise(path)
self.source = allowed_fs_host_path_or_raise(path, True)

def get(self):
return self.source
Expand Down
6 changes: 3 additions & 3 deletions ix-dev/community/bazarr/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/bazarr/icons/icon.png
keywords:
- media
- subtitles
lib_version: 2.1.5
lib_version_hash: 94754830801a8fa90e04e35d324a34a51b90d5919e544ebc1018e065adb02a12
lib_version: 2.1.6
lib_version_hash: 84c965e8b9bea696765ab62b8ee3238162fe7807d0f0a61cf9c153994a47fa90
maintainers:
- email: dev@ixsystems.com
name: truenas
Expand All @@ -31,4 +31,4 @@ sources:
- https://github.com/morpheus65535/bazarr
title: Bazarr
train: community
version: 1.1.3
version: 1.1.4
Loading

0 comments on commit 7934880

Please sign in to comment.