mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
SSOAuthenticationService: Handle login callback URL with HTML entities.
This commit is contained in:
parent
8fd1e91558
commit
71cbee1b8a
2 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
@import MatrixSDK;
|
||||
@import MatrixKit;
|
||||
@import DTCoreText;
|
||||
|
||||
#import "WebViewViewController.h"
|
||||
#import "RiotSplitViewController.h"
|
||||
|
|
Loading…
Reference in a new issue