File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -806,16 +806,12 @@ fn get_nonce_from_cookie(request: &ServiceRequest) -> anyhow::Result<Nonce> {
806806fn get_redirect_url_cookie (
807807 request : & ServiceRequest ,
808808 csrf_token : & CsrfToken ,
809- ) -> Result < Cookie < ' static > , anyhow:: Error > {
810- let cookie_name = format ! (
811- "{}{}" ,
812- SQLPAGE_REDIRECT_URL_COOKIE_PREFIX ,
813- csrf_token. secret( )
814- ) ;
815- let cookie = request
809+ ) -> anyhow:: Result < Cookie < ' static > > {
810+ let state = csrf_token. secret ( ) ;
811+ let cookie_name = format ! ( "{SQLPAGE_REDIRECT_URL_COOKIE_PREFIX}{state}" ) ;
812+ request
816813 . cookie ( & cookie_name)
817- . with_context ( || format ! ( "No {cookie_name} cookie found" ) ) ?;
818- Ok ( cookie)
814+ . with_context ( || format ! ( "No {cookie_name} cookie found" ) )
819815}
820816
821817/// Given an audience, verify if it is trusted. The `client_id` is always trusted, independently of this function.
You can’t perform that action at this time.
0 commit comments