diff options
author | UbitUmarov | 2019-10-24 17:40:39 +0100 |
---|---|---|
committer | UbitUmarov | 2019-10-24 17:40:39 +0100 |
commit | 3c4bc681c3cbf4f9a27cb224a07f0176775fb7c7 (patch) | |
tree | f6a030effa00916c3f18a680b3a0740283b42d34 /OpenSim/Services/UserAccountService/UserAccountService.cs | |
parent | oops, dont ask things twice (diff) | |
download | opensim-SC-3c4bc681c3cbf4f9a27cb224a07f0176775fb7c7.zip opensim-SC-3c4bc681c3cbf4f9a27cb224a07f0176775fb7c7.tar.gz opensim-SC-3c4bc681c3cbf4f9a27cb224a07f0176775fb7c7.tar.bz2 opensim-SC-3c4bc681c3cbf4f9a27cb224a07f0176775fb7c7.tar.xz |
refuse to create a new user with empty password
Diffstat (limited to 'OpenSim/Services/UserAccountService/UserAccountService.cs')
-rwxr-xr-x | OpenSim/Services/UserAccountService/UserAccountService.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index c51b9eb..aada0be8 100755 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -377,7 +377,7 @@ namespace OpenSim.Services.UserAccountService | |||
377 | { | 377 | { |
378 | string firstName; | 378 | string firstName; |
379 | string lastName; | 379 | string lastName; |
380 | string password; | 380 | string password = ""; |
381 | string email; | 381 | string email; |
382 | string rawPrincipalId; | 382 | string rawPrincipalId; |
383 | string model; | 383 | string model; |
@@ -393,7 +393,22 @@ namespace OpenSim.Services.UserAccountService | |||
393 | else lastName = cmdparams[3]; | 393 | else lastName = cmdparams[3]; |
394 | 394 | ||
395 | if (cmdparams.Length < 5) | 395 | if (cmdparams.Length < 5) |
396 | password = MainConsole.Instance.Prompt("Password", null, null, false); | 396 | { |
397 | int retries = 3; | ||
398 | while(--retries >= 0) | ||
399 | { | ||
400 | password = MainConsole.Instance.Prompt("Password", null, null, false); | ||
401 | if(String.IsNullOrWhiteSpace(password)) | ||
402 | MainConsole.Instance.Output(" You must provide a Password"); | ||
403 | else | ||
404 | break; | ||
405 | } | ||
406 | if (String.IsNullOrWhiteSpace(password)) | ||
407 | { | ||
408 | MainConsole.Instance.Output("create user aborted"); | ||
409 | return; | ||
410 | } | ||
411 | } | ||
397 | else password = cmdparams[4]; | 412 | else password = cmdparams[4]; |
398 | 413 | ||
399 | if (cmdparams.Length < 6) | 414 | if (cmdparams.Length < 6) |