mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-27 11:16:45 +00:00
Enforce alphanumeric bucket id
This commit is contained in:
parent
2dfb92f650
commit
3cd187e416
|
@ -86,7 +86,7 @@ class BackupsCubit extends AppConfigDependendCubit<BackupsState> {
|
||||||
Future<void> createBucket() async {
|
Future<void> createBucket() async {
|
||||||
emit(state.copyWith(preventActions: true));
|
emit(state.copyWith(preventActions: true));
|
||||||
final domain =
|
final domain =
|
||||||
appConfigCubit.state.cloudFlareDomain!.domainName.replaceAll('.', '-');
|
appConfigCubit.state.cloudFlareDomain!.domainName.replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-');
|
||||||
final serverId = appConfigCubit.state.hetznerServer!.id;
|
final serverId = appConfigCubit.state.hetznerServer!.id;
|
||||||
var bucketName = 'selfprivacy-$domain-$serverId';
|
var bucketName = 'selfprivacy-$domain-$serverId';
|
||||||
// If bucket name is too long, shorten it
|
// If bucket name is too long, shorten it
|
||||||
|
|
Loading…
Reference in a new issue