File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ impl SamlAuthData {
8484
8585 pub fn from_gpcallback ( data : & str ) -> anyhow:: Result < SamlAuthData , AuthDataParseError > {
8686 let auth_data = data. trim_start_matches ( "globalprotectcallback:" ) ;
87+ // Further remove the leading "/" if it exists, because some versions of GP may include it
88+ let auth_data = auth_data. trim_start_matches ( '/' ) ;
8789
8890 if auth_data. starts_with ( "cas-as" ) {
8991 info ! ( "Got CAS auth data from globalprotectcallback" ) ;
@@ -104,7 +106,7 @@ impl SamlAuthData {
104106 }
105107
106108 let auth_data = decode_to_string ( auth_data) . map_err ( |e| {
107- warn ! ( "Failed to decode SAML auth data: {}, data: {}" , e, auth_data ) ;
109+ warn ! ( "Failed to decode SAML auth data: {}, data: {}" , e, data ) ;
108110 AuthDataParseError :: Invalid ( anyhow:: anyhow!( e) )
109111 } ) ?;
110112 let auth_data = Self :: from_html ( & auth_data) ?;
You can’t perform that action at this time.
0 commit comments