1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 13:38:13 -05:00

install validation fixes

This commit is contained in:
Kyle Spearrin 2017-08-19 09:56:55 -04:00
parent fb80878bb0
commit 0c71c1a44f
2 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,7 @@ namespace Bit.Api.Controllers
_installationRepository = installationRepository; _installationRepository = installationRepository;
} }
[HttpPost("{id}")] [HttpGet("{id}")]
[AllowAnonymous] [AllowAnonymous]
public async Task<InstallationResponseModel> Get(Guid id) public async Task<InstallationResponseModel> Get(Guid id)
{ {

View File

@ -21,7 +21,7 @@ namespace Setup
private static bool _ssl = false; private static bool _ssl = false;
private static bool _selfSignedSsl = false; private static bool _selfSignedSsl = false;
private static bool _letsEncrypt = false; private static bool _letsEncrypt = false;
private static string _installationId = null; private static Guid? _installationId = null;
private static string _installationKey = null; private static string _installationKey = null;
private static bool _push = false; private static bool _push = false;
@ -120,14 +120,15 @@ namespace Setup
private static bool ValidateInstallation() private static bool ValidateInstallation()
{ {
Console.Write("(!) Enter your installation id (get it at https://bitwarden.com/host/): "); Console.Write("(!) Enter your installation id (get it at https://bitwarden.com/install): ");
_installationId = Console.ReadLine(); var installationId = Console.ReadLine();
Guid installationidGuid; Guid installationidGuid;
if(!Guid.TryParse(_installationId, out installationidGuid)) if(!Guid.TryParse(installationId.Trim(), out installationidGuid))
{ {
Console.WriteLine("Invalid installation id."); Console.WriteLine("Invalid installation id.");
return false; return false;
} }
_installationId = installationidGuid;
Console.Write("(!) Enter your installation key: "); Console.Write("(!) Enter your installation key: ");
_installationKey = Console.ReadLine(); _installationKey = Console.ReadLine();