Closed codegax closed 11 months ago
Unless there are other errors in the log, my guess would be that your server is not passing the "X-API-SESSION" header to Nextcloud. You should check that.
You can't access passwords directly, but you can try and disable the error:
//
or #
:
# How it looks normally:
if(!$this->sessionService->isAuthorized() && $this->requiresAuthorization($controller, $methodName)) {
throw new ApiException('Authorized session required', Http::STATUS_PRECONDITION_FAILED);
}
if(!$this->sessionService->isAuthorized() && $this->requiresAuthorization($controller, $methodName)) {
// throw new ApiException('Authorized session required', Http::STATUS_PRECONDITION_FAILED);
}
- In case you have code caching technologies (opcache, jit) enabled, you may need to restart your webserver or PHP FPM.
Thanks for the response I commented out line that throws the error in all:
Restarted the whole system, confirmed that files had my changes but still get the error :( Should I look into nginx config for the missing X-API-SESSION or maybe the traefik ingress that I use to access the app?
Again thanks for the help!
Here's the header request from the web:
:authority:
nextcloud.site.com
:method:
POST
:path:
/index.php/apps/passwords/api/1.0/session/open
:scheme:
https
Accept:
application/json
Accept-Encoding:
gzip, deflate, br
Accept-Language:
en-US,en;q=0.7
Authorization:
Basic **redacted**
Content-Length:
80
Content-Type:
application/json
Origin:
https://nextcloud.site.com
Referer:
https://nextcloud.site.com/apps/passwords/
Sec-Ch-Ua:
"Not_A Brand";v="8", "Chromium";v="120", "Brave";v="120"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Linux"
Sec-Fetch-Dest:
empty
Sec-Fetch-Mode:
cors
Sec-Fetch-Site:
same-origin
Sec-Gpc:
1
User-Agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
X-Api-Session:
**re|da|c|ted**
X-Requested-With:
XMLHttpRequest
Try restoring oldest backup that has the password am looking for, then did occ maintanance:repair
- Repair Passwords Database Objects
- Checking 1 tag revisions
1/1 [============================] 100%
- Fixed 0 tag revisions
- Checking 5 folder revisions
5/5 [============================] 100%
- Fixed 1 folder revisions
- Checking 46 password revisions
46/46 [============================] 100%
- Fixed 6 password revisions
- Checking 1 tag models
1/1 [============================] 100%
- Fixed 0 tag models
- Checking 5 folder models
5/5 [============================] 100%
- Fixed 1 folder models
- Checking 30 password models
30/30 [============================] 100%
- Fixed 3 password models
- Checking 1 password tag relations
1/1 [============================] 100%
- Fixed 0 password tag relations
- Checking 0 shares
0 [>---------------------------]
- Fixed 0 shares
Still no luck accessing the passwords, I also exported this backup nc-passwords.json.gz if that could help
I just checked the log entry again and there is actually a second error in it: "HMAC does not match." The "Authorized session required" error occurs, because decrypting the encryption keys/keychain fails. So this is no session issue, there is a part of the encryption keys missing.
I would restore a backup from before the last Nextcloud update.
Restoring a backup from last Nextcloud update solved the issue. Thanks for the support!
⚠️ This issue respects the following points: ⚠️
Server Information
Client Information
Browser and Version: Brave latest and Android Nextcloud Passwords 1.0.6 Client OS and Version: Linux Fedora, Android
Bug description
Can't access my passwords in any client. I only need one that is vital to me and I don't have it anywhere else. Is there a way to access directly?
Steps to reproduce
Expected behavior
Nextcloud Logs
Browser Logs