ios: attempt to fix cookie related issue

server: fail-safe in case client id is not found in http cookies
This commit is contained in:
jean-emmanuel 2022-03-20 18:59:21 +01:00
parent 85b7b43928
commit a60c1423a7
4 changed files with 40 additions and 13 deletions

View file

@ -45,6 +45,18 @@ resolveDirs.push(settings.read('remote-root') || '') // remote-root / absolute
function resolvePath(url, clientId) {
if (clientId === undefined) {
// safari seems to be picky with cookies
console.error(`(ERROR, HTTP) Could not resolve requested url ${url} (client id not found in http cookies)`)
return false
}
if (!ipc.clients[clientId]) {
// this should never happen, but just in case...
console.error(`(ERROR, HTTP) Could not resolve requested url ${url} (unregistered client id ${clientId})`)
return false
}
var sessionPath = path.dirname(ipc.clients[clientId].sessionPath)
url = resolveHomeDir(url)