mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-26 19:21:39 +00:00
Fix hashPass and remove error code return on authorize
This commit is contained in:
parent
73a61872fa
commit
ddce6ec5b7
2 changed files with 2 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ class Auth {
|
||||||
}
|
}
|
||||||
|
|
||||||
generateRandomPasswordHash() {
|
generateRandomPasswordHash() {
|
||||||
return hashPass(getId())
|
return this.hashPass(getId())
|
||||||
}
|
}
|
||||||
|
|
||||||
generateAccessToken(payload) {
|
generateAccessToken(payload) {
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,7 @@ class MiscController {
|
||||||
|
|
||||||
// When authorizing an API token and forward auth is enabled then validate user using forward auth headers
|
// When authorizing an API token and forward auth is enabled then validate user using forward auth headers
|
||||||
if (global.ForwardAuth.Enabled && !this.auth.validateForwardAuthUser(req)) {
|
if (global.ForwardAuth.Enabled && !this.auth.validateForwardAuthUser(req)) {
|
||||||
Logger.error(`[MiscController] Authorize token with forward auth enabled failed for user "${req.user.username}"`)
|
Logger.warn(`[MiscController] Authorize token with forward auth enabled failed for user "${req.user.username}"`)
|
||||||
return res.sendStatus(403)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const userResponse = this.auth.getUserLoginResponsePayload(req.user, this.rssFeedManager.feedsArray)
|
const userResponse = this.auth.getUserLoginResponsePayload(req.user, this.rssFeedManager.feedsArray)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue