aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-23 11:36:50 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commite1c5503114deef954731904695cd40dccfcef555 (patch)
tree72cec4ee691a3362a7d024dc830d215a6b2c800a /server/middlewares
parent8dc8a34ee8428e7657414115d1c137592efa174d (diff)
downloadPeerTube-e1c5503114deef954731904695cd40dccfcef555.tar.gz
PeerTube-e1c5503114deef954731904695cd40dccfcef555.tar.zst
PeerTube-e1c5503114deef954731904695cd40dccfcef555.zip
Support logout and add id and pass tests
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/oauth.ts2
-rw-r--r--server/middlewares/validators/themes.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/oauth.ts b/server/middlewares/oauth.ts
index 4ae7f18c2..9d0eaa51f 100644
--- a/server/middlewares/oauth.ts
+++ b/server/middlewares/oauth.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { logger } from '../helpers/logger' 2import { logger } from '../helpers/logger'
3import { Socket } from 'socket.io' 3import { Socket } from 'socket.io'
4import { getAccessToken } from '../lib/oauth-model' 4import { getAccessToken } from '../lib/oauth-model'
5import { handleIdAndPassLogin, oAuthServer } from '@server/lib/auth' 5import { oAuthServer } from '@server/lib/auth'
6 6
7function authenticate (req: express.Request, res: express.Response, next: express.NextFunction, authenticateInQuery = false) { 7function authenticate (req: express.Request, res: express.Response, next: express.NextFunction, authenticateInQuery = false) {
8 const options = authenticateInQuery ? { allowBearerTokensInQueryString: true } : {} 8 const options = authenticateInQuery ? { allowBearerTokensInQueryString: true } : {}
diff --git a/server/middlewares/validators/themes.ts b/server/middlewares/validators/themes.ts
index 24a9673f7..82794656d 100644
--- a/server/middlewares/validators/themes.ts
+++ b/server/middlewares/validators/themes.ts
@@ -16,7 +16,7 @@ const serveThemeCSSValidator = [
16 16
17 if (areValidationErrors(req, res)) return 17 if (areValidationErrors(req, res)) return
18 18
19 const theme = PluginManager.Instance.getRegisteredTheme(req.params.themeName) 19 const theme = PluginManager.Instance.getRegisteredThemeByShortName(req.params.themeName)
20 20
21 if (!theme || theme.version !== req.params.themeVersion) { 21 if (!theme || theme.version !== req.params.themeVersion) {
22 return res.sendStatus(404) 22 return res.sendStatus(404)