diff --git a/.github/workflows/compile_development.yml b/.github/workflows/compile_development.yml index 67fa6f0a..4b5a0e1a 100644 --- a/.github/workflows/compile_development.yml +++ b/.github/workflows/compile_development.yml @@ -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') }} diff --git a/src/web/Protection.h b/src/web/Protection.h index 44926752..d0c73a9e 100644 --- a/src/web/Protection.h +++ b/src/web/Protection.h @@ -51,6 +51,7 @@ class Protection { } void unlock(const char *clientIp) { + mLogoutTimeout = LOGOUT_TIMEOUT; mProtected = false; ah::ip2Arr(static_cast(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 ip; + ah::ip2Arr(static_cast(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: