mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-28 04:06:57 +02:00
SSOAuthenticationService: Handle login callback URL with HTML entities.
This commit is contained in:
@@ -70,7 +70,9 @@ final class SSOAuthenticationService: NSObject {
|
||||
}
|
||||
|
||||
func loginToken(from url: URL) -> String? {
|
||||
guard let components = URLComponents(string: url.absoluteString) else {
|
||||
// If needed convert URL string from HTML entities into correct character representations using UTF8 (like '&' with '&')
|
||||
guard let sanitizedStringURL = url.absoluteString.replacingHTMLEntities(),
|
||||
let components = URLComponents(string: sanitizedStringURL) else {
|
||||
return nil
|
||||
}
|
||||
return components.vc_getQueryItemValue(for: SSOURLConstants.Parameters.callbackLoginToken)
|
||||
|
||||
Reference in New Issue
Block a user