Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -PWRESET Command Line Argument #603

Merged
merged 3 commits into from
Nov 24, 2023
Merged

Add -PWRESET Command Line Argument #603

merged 3 commits into from
Nov 24, 2023

Conversation

enusbaum
Copy link
Member

  • Add -PWRESET Command Line Argument to reset Sysop Password
  • Moved Password Prompt to common method (used by -DBRESET as well)
  • Moved GUI to start after pre-launch items (Password reset, etc.)

Fixes #542

- Add `-PWRESET` Command Line Argument to reset Sysop Password
- Moved Password Prompt to common method (used by `-DBRESET` as well)
- Moved GUI to start after pre-launch items (Password reset, etc.)
/// <exception cref="Exception"></exception>
private string PasswordPrompt(string username)
{
var bPasswordMatch = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friends don't let friends use Hungarian Notation


var acct = _serviceResolver.GetService<IAccountRepository>();
var sysopAccount = acct.GetAccountByUsername("sysop");
acct.UpdateAccountById(sysopAccount.accountId, sysopAccount.userName, _newSysopPassword, sysopAccount.email);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we clear the _newSysopPassword reference for security purposes here?

- Just make Password Prompt and infinite loop until they match
- Set `_doResetPassword` to false when the password is reset
@enusbaum enusbaum merged commit da908ee into master Nov 24, 2023
1 check passed
@enusbaum enusbaum deleted the sysop-password-reset branch November 24, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MBBSEmu] Allow sysop password resets w/o full database resets
2 participants