fix: v0.8.15 — auth testMode validates @ in token (block P fix)
This commit is contained in:
@@ -46,7 +46,7 @@ spec:
|
|||||||
serviceAccountName: fission-console
|
serviceAccountName: fission-console
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: naeel/fission-console:v0.8.14
|
image: naeel/fission-console:v0.8.15
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8090
|
- containerPort: 8090
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1867,6 +1867,10 @@ func (s *server) handleAuth(w http.ResponseWriter, r *http.Request) {
|
|||||||
var ns string
|
var ns string
|
||||||
if s.testMode {
|
if s.testMode {
|
||||||
// testMode: токен — это sub (email), Deck не вызывается
|
// testMode: токен — это sub (email), Deck не вызывается
|
||||||
|
if !strings.Contains(body.Token, "@") {
|
||||||
|
writeJSONError(w, http.StatusUnauthorized, "invalid token")
|
||||||
|
return
|
||||||
|
}
|
||||||
ns = func() string {
|
ns = func() string {
|
||||||
h32 := sha256.Sum256([]byte(body.Token))
|
h32 := sha256.Sum256([]byte(body.Token))
|
||||||
return "fission-" + hex.EncodeToString(h32[:8])
|
return "fission-" + hex.EncodeToString(h32[:8])
|
||||||
|
|||||||
Reference in New Issue
Block a user