mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-30 18:56:27 +02:00
0.8.70
* fix login * fix github actions Node.js 16 warnings
This commit is contained in:
parent
4d7362fa6b
commit
9065ff5b98
2 changed files with 13 additions and 10 deletions
12
.github/workflows/compile_development.yml
vendored
12
.github/workflows/compile_development.yml
vendored
|
@ -33,13 +33,13 @@ jobs:
|
||||||
- opendtufusion-ethernet
|
- opendtufusion-ethernet
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: benjlevesque/short-sha@v2.1
|
- uses: benjlevesque/short-sha@v2.2
|
||||||
id: short-sha
|
id: short-sha
|
||||||
with:
|
with:
|
||||||
length: 7
|
length: 7
|
||||||
|
|
||||||
- name: Cache Pip
|
- name: Cache Pip
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
- name: Cache PlatformIO
|
- name: Cache PlatformIO
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio
|
path: ~/.platformio
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
@ -93,13 +93,13 @@ jobs:
|
||||||
- opendtufusion-ethernet-de
|
- opendtufusion-ethernet-de
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: benjlevesque/short-sha@v2.1
|
- uses: benjlevesque/short-sha@v2.2
|
||||||
id: short-sha
|
id: short-sha
|
||||||
with:
|
with:
|
||||||
length: 7
|
length: 7
|
||||||
|
|
||||||
- name: Cache Pip
|
- name: Cache Pip
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
|
@ -107,7 +107,7 @@ jobs:
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
- name: Cache PlatformIO
|
- name: Cache PlatformIO
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio
|
path: ~/.platformio
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
|
|
@ -51,6 +51,7 @@ class Protection {
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlock(const char *clientIp) {
|
void unlock(const char *clientIp) {
|
||||||
|
mLogoutTimeout = LOGOUT_TIMEOUT;
|
||||||
mProtected = false;
|
mProtected = false;
|
||||||
ah::ip2Arr(static_cast<uint8_t*>(mLoginIp.data()), clientIp);
|
ah::ip2Arr(static_cast<uint8_t*>(mLoginIp.data()), clientIp);
|
||||||
}
|
}
|
||||||
|
@ -70,14 +71,16 @@ class Protection {
|
||||||
if(mPwd[0] == '\0')
|
if(mPwd[0] == '\0')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint8_t ip[4];
|
std::array<uint8_t, 4> ip;
|
||||||
ah::ip2Arr(ip, clientIp);
|
ah::ip2Arr(static_cast<uint8_t*>(ip.data()), clientIp);
|
||||||
for(uint8_t i = 0; i < 4; i++) {
|
for(uint8_t i = 0; i < 4; i++) {
|
||||||
if(mLoginIp[i] != ip[i])
|
if(mLoginIp[i] != ip[i]) {
|
||||||
|
DPRINTLN(DBG_INFO, "ip nicht gleich!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Add table
Reference in a new issue