mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +00:00
✏Typos (#30)
This commit is contained in:
parent
dbc5c19299
commit
8a5c457a4c
4 changed files with 9 additions and 9 deletions
|
@ -1187,7 +1187,7 @@ function bashio::require.protected() {
|
||||||
bashio::log.fatal "protection mode is enabled on this add-on."
|
bashio::log.fatal "protection mode is enabled on this add-on."
|
||||||
bashio::log.fatal
|
bashio::log.fatal
|
||||||
bashio::log.fatal "Unfortunately, it has been disabled."
|
bashio::log.fatal "Unfortunately, it has been disabled."
|
||||||
bashio::log.fatal "Pleas enable it again!"
|
bashio::log.fatal "Please enable it again!"
|
||||||
bashio::log.fatal ""
|
bashio::log.fatal ""
|
||||||
bashio::log.fatal "Steps:"
|
bashio::log.fatal "Steps:"
|
||||||
bashio::log.fatal " - Go to the Supervisor Panel."
|
bashio::log.fatal " - Go to the Supervisor Panel."
|
||||||
|
|
|
@ -63,7 +63,7 @@ function bashio::cache.set() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! printf "%s" "$value" > "${__BASHIO_CACHE_DIR}/${key}.cache"; then
|
if ! printf "%s" "$value" > "${__BASHIO_CACHE_DIR}/${key}.cache"; then
|
||||||
bashio::log.warning "An error occured while storing ${key} to cache"
|
bashio::log.warning "An error occurred while storing ${key} to cache"
|
||||||
return "${__BASHIO_EXIT_NOK}"
|
return "${__BASHIO_EXIT_NOK}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ function bashio::os.config_sync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Returns a JSON object with generic Home Asssistant information.
|
# Returns a JSON object with generic Home Assistant information.
|
||||||
#
|
#
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# $1 Cache key to store results in (optional)
|
# $1 Cache key to store results in (optional)
|
||||||
|
|
12
lib/pwned.sh
12
lib/pwned.sh
|
@ -15,16 +15,16 @@
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
function bashio::pwned.is_safe_password() {
|
function bashio::pwned.is_safe_password() {
|
||||||
local password="${1}"
|
local password="${1}"
|
||||||
local occurances
|
local occurrences
|
||||||
|
|
||||||
bashio::log.trace "${FUNCNAME[0]}" "<REDACTED PASSWORD>"
|
bashio::log.trace "${FUNCNAME[0]}" "<REDACTED PASSWORD>"
|
||||||
|
|
||||||
if ! occurances=$(bashio::pwned "${password}"); then
|
if ! occurrences=$(bashio::pwned "${password}"); then
|
||||||
bashio::log.warning "Could not check password, assuming it is safe."
|
bashio::log.warning "Could not check password, assuming it is safe."
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${occurances}" -ne 0 ]]; then
|
if [[ "${occurrences}" -ne 0 ]]; then
|
||||||
return "${__BASHIO_EXIT_NOK}"
|
return "${__BASHIO_EXIT_NOK}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ function bashio::pwned.is_safe_password() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Gets the number of occurances of the password in the list.
|
# Gets the number of occurrences of the password in the list.
|
||||||
#
|
#
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# $1 The password to check
|
# $1 The password to check
|
||||||
|
@ -80,7 +80,7 @@ function bashio::pwned() {
|
||||||
)
|
)
|
||||||
bashio::log.debug "Password SHA1: ${password}"
|
bashio::log.debug "Password SHA1: ${password}"
|
||||||
|
|
||||||
# Check with have I Been Powned, only send the first 5 chars of the hash
|
# Check with have I Been Pwned, only send the first 5 chars of the hash
|
||||||
if ! response=$(curl \
|
if ! response=$(curl \
|
||||||
--silent \
|
--silent \
|
||||||
--show-error \
|
--show-error \
|
||||||
|
@ -111,7 +111,7 @@ function bashio::pwned() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${status}" -ne 200 ]]; then
|
if [[ "${status}" -ne 200 ]]; then
|
||||||
bashio::log.error "Unknown HIBP HTTP error occured."
|
bashio::log.error "Unknown HIBP HTTP error occurred."
|
||||||
return "${__BASHIO_EXIT_NOK}"
|
return "${__BASHIO_EXIT_NOK}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue