mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Widgets: Attempt to re-register for a scalar token if ours is invalid
#2326 Add sanity check
This commit is contained in:
@@ -333,6 +333,11 @@ NSString *const kJavascriptSendResponseToPostMessageAPI = @"riotIOS.sendResponse
|
||||
|
||||
- (NSString *)stringByReplacingScalarTokenInString:(NSString*)string byScalarToken:(NSString*)scalarToken
|
||||
{
|
||||
if (!scalarToken)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"scalar_token=\\w*"
|
||||
options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
return [regex stringByReplacingMatchesInString:string
|
||||
|
||||
Reference in New Issue
Block a user