mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-29 10:16:21 +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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: benjlevesque/short-sha@v2.1
|
||||
- uses: benjlevesque/short-sha@v2.2
|
||||
id: short-sha
|
||||
with:
|
||||
length: 7
|
||||
|
||||
- name: Cache Pip
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
|
@ -47,7 +47,7 @@ jobs:
|
|||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
@ -93,13 +93,13 @@ jobs:
|
|||
- opendtufusion-ethernet-de
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: benjlevesque/short-sha@v2.1
|
||||
- uses: benjlevesque/short-sha@v2.2
|
||||
id: short-sha
|
||||
with:
|
||||
length: 7
|
||||
|
||||
- name: Cache Pip
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
|
@ -107,7 +107,7 @@ jobs:
|
|||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
|
|
@ -51,6 +51,7 @@ class Protection {
|
|||
}
|
||||
|
||||
void unlock(const char *clientIp) {
|
||||
mLogoutTimeout = LOGOUT_TIMEOUT;
|
||||
mProtected = false;
|
||||
ah::ip2Arr(static_cast<uint8_t*>(mLoginIp.data()), clientIp);
|
||||
}
|
||||
|
@ -70,14 +71,16 @@ class Protection {
|
|||
if(mPwd[0] == '\0')
|
||||
return false;
|
||||
|
||||
uint8_t ip[4];
|
||||
ah::ip2Arr(ip, clientIp);
|
||||
std::array<uint8_t, 4> ip;
|
||||
ah::ip2Arr(static_cast<uint8_t*>(ip.data()), clientIp);
|
||||
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 false;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Reference in a new issue