From f6f5d66bdc5d0ae8184a4c64feaae716045f5e4d Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Wed, 28 Aug 2024 03:35:19 +0200 Subject: [PATCH] adduser: improve error message for large numeric input Old message was not as intended: > Name for the new account: 123123123123 > That's way too much money. Enter 'abort' to abort. Fixed: > Name for the new account: 123123123123 Sorry, that's too numeric to be a user name. Enter 'abort' to abort. --- plugins/adduser | 2 +- revbank | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/adduser b/plugins/adduser index 2e11746..3c9f83d 100644 --- a/plugins/adduser +++ b/plugins/adduser @@ -22,7 +22,7 @@ sub username($self, $cart, $name, @) { if $name =~ /^[-+*\/\^]/; return REJECT, "Sorry, that's too numeric to be a user name." - if defined parse_amount($name); + if defined RevBank::Amount->parse_string($name); return REJECT, "That name is not available." if defined parse_user($name, 1); diff --git a/revbank b/revbank index aad6e29..df9b933 100755 --- a/revbank +++ b/revbank @@ -17,7 +17,7 @@ use RevBank::Messages; use RevBank::Cart; use RevBank::Prompt; -our $VERSION = "6.2.0"; +our $VERSION = "6.2.1"; our %HELP1 = ( "abort" => "Abort the current transaction", ); @@ -159,6 +159,7 @@ OUTER: for (;;) { abort if $method eq "command" and $word eq "abort"; # here, even when quoted + push @retry, $word; ALL_PLUGINS: { PLUGIN: for my $plugin (@plugins) {