mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-04 07:20:39 +00:00
Encode password to base64 during server creation
This commit is contained in:
parent
4d8843f008
commit
cca55f82cc
1
fastlane/metadata/android/en-US/changelogs/0.5.2.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/0.5.2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
- Fixed bug when you couldn't use special symbols in password during server creation.
|
|
@ -1,3 +1,4 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
@ -129,13 +130,15 @@ class HetznerApi extends ApiMap {
|
|||
hostname = 'selfprivacy-server';
|
||||
}
|
||||
|
||||
final base64Password = base64.encode(utf8.encode(rootUser.password ?? 'PASS'));
|
||||
|
||||
print("hostname: $hostname");
|
||||
|
||||
/// add ssh key when you need it: e.g. "ssh_keys":["kherel"]
|
||||
/// check the branch name, it could be "development" or "master".
|
||||
///
|
||||
final userdataString =
|
||||
"#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${escapeQuotes(rootUser.login)}' PASSWORD='${escapeQuotes(rootUser.password ?? 'PASS')}' CF_TOKEN=$cloudFlareKey DB_PASSWORD=${escapeQuotes(dbPassword)} API_TOKEN=$apiToken HOSTNAME=${escapeQuotes(hostname)} bash 2>&1 | tee /tmp/infect.log";
|
||||
"#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${escapeQuotes(rootUser.login)}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$cloudFlareKey DB_PASSWORD=${escapeQuotes(dbPassword)} API_TOKEN=$apiToken HOSTNAME=${escapeQuotes(hostname)} bash 2>&1 | tee /tmp/infect.log";
|
||||
print(userdataString);
|
||||
|
||||
final data = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: selfprivacy
|
||||
description: selfprivacy.org
|
||||
publish_to: 'none'
|
||||
version: 0.5.1+12
|
||||
version: 0.5.2+13
|
||||
|
||||
environment:
|
||||
sdk: '>=2.13.4 <3.0.0'
|
||||
|
|
Loading…
Reference in a new issue