chore: Sanitize hash param for oidc
This commit is contained in:
parent
bed0a89d65
commit
bfbcd31f35
1 changed files with 10 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import 'dart:isolate';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
|
|
@ -8,6 +9,7 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|||
import 'package:flutter_vodozemac/flutter_vodozemac.dart' as vod;
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:universal_html/universal_html.dart' as web;
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/utils/client_manager.dart';
|
||||
|
|
@ -30,6 +32,14 @@ void main() async {
|
|||
await waitForPushIsolateDone();
|
||||
}
|
||||
|
||||
// Sanitize hash for OIDC:
|
||||
if (kIsWeb) {
|
||||
final hash = web.window.location.hash;
|
||||
if (hash.isNotEmpty && !hash.startsWith('/')) {
|
||||
web.window.location.hash = hash.replaceFirst('#', '#?');
|
||||
}
|
||||
}
|
||||
|
||||
// Our background push shared isolate accesses flutter-internal things very early in the startup proccess
|
||||
// To make sure that the parts of flutter needed are started up already, we need to ensure that the
|
||||
// widget bindings are initialized already.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue