mirror of
https://github.com/Yubico/yubiadmin.git
synced 2025-02-21 08:54:16 +01:00
Properly commit YubiAuth changes when redirecting (fixes #6).
This commit is contained in:
parent
fbf1e0d000
commit
70de2f37ff
@ -28,6 +28,7 @@
|
|||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
import imp
|
import imp
|
||||||
|
from webob import exc
|
||||||
from wtforms import Form
|
from wtforms import Form
|
||||||
from wtforms.fields import (SelectField, TextField, BooleanField, IntegerField,
|
from wtforms.fields import (SelectField, TextField, BooleanField, IntegerField,
|
||||||
PasswordField)
|
PasswordField)
|
||||||
@ -375,7 +376,12 @@ class YubiAuthApp(App):
|
|||||||
|
|
||||||
with YubiAuth() as auth:
|
with YubiAuth() as auth:
|
||||||
app = YubiAuthUsers(auth)
|
app = YubiAuthUsers(auth)
|
||||||
return app(request).prerendered
|
try:
|
||||||
|
return app(request).prerendered
|
||||||
|
except (exc.HTTPOk, exc.HTTPRedirection) as e:
|
||||||
|
# Ensure auth is closed on 200-300 codes.
|
||||||
|
exception = e
|
||||||
|
raise exception
|
||||||
|
|
||||||
# Pulls the tab to the right:
|
# Pulls the tab to the right:
|
||||||
advanced.advanced = True
|
advanced.advanced = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user