Enforce alphanumeric bucket id

remotes/1708434123922220183/feature/service-configurations
Inex Code 2021-12-27 07:40:48 +00:00 committed by kherel
parent 2dfb92f650
commit 3cd187e416
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class BackupsCubit extends AppConfigDependendCubit<BackupsState> {
Future<void> createBucket() async {
emit(state.copyWith(preventActions: true));
final domain =
appConfigCubit.state.cloudFlareDomain!.domainName.replaceAll('.', '-');
appConfigCubit.state.cloudFlareDomain!.domainName.replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-');
final serverId = appConfigCubit.state.hetznerServer!.id;
var bucketName = 'selfprivacy-$domain-$serverId';
// If bucket name is too long, shorten it