mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Merge pull request #45472 from home-assistant/rc
This commit is contained in:
commit
6715eae3d7
@ -2,6 +2,6 @@
|
|||||||
"domain": "mpd",
|
"domain": "mpd",
|
||||||
"name": "Music Player Daemon (MPD)",
|
"name": "Music Player Daemon (MPD)",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/mpd",
|
"documentation": "https://www.home-assistant.io/integrations/mpd",
|
||||||
"requirements": ["python-mpd2==3.0.1"],
|
"requirements": ["python-mpd2==3.0.3"],
|
||||||
"codeowners": ["@fabaff"]
|
"codeowners": ["@fabaff"]
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/neato",
|
"documentation": "https://www.home-assistant.io/integrations/neato",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pybotvac==0.0.19"
|
"pybotvac==0.0.20"
|
||||||
],
|
],
|
||||||
"codeowners": [
|
"codeowners": [
|
||||||
"@dshokouhi",
|
"@dshokouhi",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Netatmo",
|
"name": "Netatmo",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/netatmo",
|
"documentation": "https://www.home-assistant.io/integrations/netatmo",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pyatmo==4.2.1"
|
"pyatmo==4.2.2"
|
||||||
],
|
],
|
||||||
"after_dependencies": [
|
"after_dependencies": [
|
||||||
"cloud",
|
"cloud",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
MAJOR_VERSION = 2021
|
MAJOR_VERSION = 2021
|
||||||
MINOR_VERSION = 1
|
MINOR_VERSION = 1
|
||||||
PATCH_VERSION = "4"
|
PATCH_VERSION = "5"
|
||||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER = (3, 7, 1)
|
REQUIRED_PYTHON_VER = (3, 7, 1)
|
||||||
|
@ -33,13 +33,33 @@ RE_SANITIZE_PATH = re.compile(r"(~|\.(\.)+)")
|
|||||||
|
|
||||||
|
|
||||||
def sanitize_filename(filename: str) -> str:
|
def sanitize_filename(filename: str) -> str:
|
||||||
r"""Sanitize a filename by removing .. / and \\."""
|
"""Check if a filename is safe.
|
||||||
return RE_SANITIZE_FILENAME.sub("", filename)
|
|
||||||
|
Only to be used to compare to original filename to check if changed.
|
||||||
|
If result changed, the given path is not safe and should not be used,
|
||||||
|
raise an error.
|
||||||
|
|
||||||
|
DEPRECATED.
|
||||||
|
"""
|
||||||
|
# Backwards compatible fix for misuse of method
|
||||||
|
if RE_SANITIZE_FILENAME.sub("", filename) != filename:
|
||||||
|
return ""
|
||||||
|
return filename
|
||||||
|
|
||||||
|
|
||||||
def sanitize_path(path: str) -> str:
|
def sanitize_path(path: str) -> str:
|
||||||
"""Sanitize a path by removing ~ and .."""
|
"""Check if a path is safe.
|
||||||
return RE_SANITIZE_PATH.sub("", path)
|
|
||||||
|
Only to be used to compare to original path to check if changed.
|
||||||
|
If result changed, the given path is not safe and should not be used,
|
||||||
|
raise an error.
|
||||||
|
|
||||||
|
DEPRECATED.
|
||||||
|
"""
|
||||||
|
# Backwards compatible fix for misuse of method
|
||||||
|
if RE_SANITIZE_PATH.sub("", path) != path:
|
||||||
|
return ""
|
||||||
|
return path
|
||||||
|
|
||||||
|
|
||||||
def slugify(text: str, *, separator: str = "_") -> str:
|
def slugify(text: str, *, separator: str = "_") -> str:
|
||||||
|
@ -1271,7 +1271,7 @@ pyarlo==0.2.4
|
|||||||
pyatag==0.3.4.4
|
pyatag==0.3.4.4
|
||||||
|
|
||||||
# homeassistant.components.netatmo
|
# homeassistant.components.netatmo
|
||||||
pyatmo==4.2.1
|
pyatmo==4.2.2
|
||||||
|
|
||||||
# homeassistant.components.atome
|
# homeassistant.components.atome
|
||||||
pyatome==0.1.1
|
pyatome==0.1.1
|
||||||
@ -1289,7 +1289,7 @@ pyblackbird==0.5
|
|||||||
# pybluez==0.22
|
# pybluez==0.22
|
||||||
|
|
||||||
# homeassistant.components.neato
|
# homeassistant.components.neato
|
||||||
pybotvac==0.0.19
|
pybotvac==0.0.20
|
||||||
|
|
||||||
# homeassistant.components.nissan_leaf
|
# homeassistant.components.nissan_leaf
|
||||||
pycarwings2==2.10
|
pycarwings2==2.10
|
||||||
@ -1780,7 +1780,7 @@ python-juicenet==1.0.1
|
|||||||
python-miio==0.5.4
|
python-miio==0.5.4
|
||||||
|
|
||||||
# homeassistant.components.mpd
|
# homeassistant.components.mpd
|
||||||
python-mpd2==3.0.1
|
python-mpd2==3.0.3
|
||||||
|
|
||||||
# homeassistant.components.mystrom
|
# homeassistant.components.mystrom
|
||||||
python-mystrom==1.1.2
|
python-mystrom==1.1.2
|
||||||
|
@ -646,7 +646,7 @@ pyarlo==0.2.4
|
|||||||
pyatag==0.3.4.4
|
pyatag==0.3.4.4
|
||||||
|
|
||||||
# homeassistant.components.netatmo
|
# homeassistant.components.netatmo
|
||||||
pyatmo==4.2.1
|
pyatmo==4.2.2
|
||||||
|
|
||||||
# homeassistant.components.apple_tv
|
# homeassistant.components.apple_tv
|
||||||
pyatv==0.7.5
|
pyatv==0.7.5
|
||||||
@ -655,7 +655,7 @@ pyatv==0.7.5
|
|||||||
pyblackbird==0.5
|
pyblackbird==0.5
|
||||||
|
|
||||||
# homeassistant.components.neato
|
# homeassistant.components.neato
|
||||||
pybotvac==0.0.19
|
pybotvac==0.0.20
|
||||||
|
|
||||||
# homeassistant.components.cloudflare
|
# homeassistant.components.cloudflare
|
||||||
pycfdns==1.2.1
|
pycfdns==1.2.1
|
||||||
|
@ -12,17 +12,17 @@ from tests.async_mock import MagicMock, patch
|
|||||||
def test_sanitize_filename():
|
def test_sanitize_filename():
|
||||||
"""Test sanitize_filename."""
|
"""Test sanitize_filename."""
|
||||||
assert util.sanitize_filename("test") == "test"
|
assert util.sanitize_filename("test") == "test"
|
||||||
assert util.sanitize_filename("/test") == "test"
|
assert util.sanitize_filename("/test") == ""
|
||||||
assert util.sanitize_filename("..test") == "test"
|
assert util.sanitize_filename("..test") == ""
|
||||||
assert util.sanitize_filename("\\test") == "test"
|
assert util.sanitize_filename("\\test") == ""
|
||||||
assert util.sanitize_filename("\\../test") == "test"
|
assert util.sanitize_filename("\\../test") == ""
|
||||||
|
|
||||||
|
|
||||||
def test_sanitize_path():
|
def test_sanitize_path():
|
||||||
"""Test sanitize_path."""
|
"""Test sanitize_path."""
|
||||||
assert util.sanitize_path("test/path") == "test/path"
|
assert util.sanitize_path("test/path") == "test/path"
|
||||||
assert util.sanitize_path("~test/path") == "test/path"
|
assert util.sanitize_path("~test/path") == ""
|
||||||
assert util.sanitize_path("~/../test/path") == "//test/path"
|
assert util.sanitize_path("~/../test/path") == ""
|
||||||
|
|
||||||
|
|
||||||
def test_slugify():
|
def test_slugify():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user