Keukeiland / KeukNet

The source-code of the KeukNet connection web interface.
https://keuk.net/
Mozilla Public License 2.0
0 stars 0 forks source link

Unknown error: "password" is undefined #11

Closed fizitzfux closed 1 month ago

fizitzfux commented 5 months ago

A seemingly random error that just appeared, will look into it soon-ish when I have time, just know we are aware of it. The UA triggering it identified as NULL and was authenticated.

A restart of the server seems to temporarily fix it.

node:internal/crypto/util:114
    throw new ERR_INVALID_ARG_TYPE(
    ^
TypeError [ERR_INVALID_ARG_TYPE]: The "password" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined
    at check (node:internal/crypto/pbkdf2:92:14)
    at Object.pbkdf2Sync (node:internal/crypto/pbkdf2:70:5)
    at __decrypt_auth (/home/user/keuknet/modules/data.js:71:19)
    at exports.authenticate (/home/user/keuknet/modules/data.js:158:5)
    at exports.main (/home/user/keuknet/www/index.js:40:10)
    at Http2SecureServer.requestListener (/home/user/keuknet/index.js:128:16)
    at Http2SecureServer.emit (node:events:513:28)
    at parserOnIncoming (node:_http_server:1091:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) {
  code: 'ERR_INVALID_ARG_TYPE'
}
fizitzfux commented 3 months ago

Not critical anymore as it is planned for v2.4.0 to change from HTTP Basic auth to a form and session based login, with Basic auth only being a compatibility option.