diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2010-04-16 11:26:32 -0500 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2010-04-26 17:41:45 -0600 |
| commit | a7b2cdc8c3ee5fcc23155d791cafc48f554008f2 (patch) | |
| tree | 31f9b663124078f39865278c74cfdeee80ba2fdf /ldap/admin/src/scripts/DSDialogs.pm | |
| parent | 78c50664d6421cc5d0836bb03820680dc2cb7acf (diff) | |
| download | ds-a7b2cdc8c3ee5fcc23155d791cafc48f554008f2.tar.gz ds-a7b2cdc8c3ee5fcc23155d791cafc48f554008f2.tar.xz ds-a7b2cdc8c3ee5fcc23155d791cafc48f554008f2.zip | |
Bug 542570 - Directory Server port number is not validated in the beginning.
https://bugzilla.redhat.com/show_bug.cgi?id=542570
Resolves: bug 542570
Bug Description: Directory Server port number is not validated in the beginning.
Fix Description: The code has been modified to validate the port value from the
beginning of the string to the end to ensure that it only contains digits and to
generate the appropriate error message.
Reviewed by: rmeggins (and pushed)
Diffstat (limited to 'ldap/admin/src/scripts/DSDialogs.pm')
| -rw-r--r-- | ldap/admin/src/scripts/DSDialogs.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/admin/src/scripts/DSDialogs.pm b/ldap/admin/src/scripts/DSDialogs.pm index 6583ff9e..60bc1155 100644 --- a/ldap/admin/src/scripts/DSDialogs.pm +++ b/ldap/admin/src/scripts/DSDialogs.pm @@ -64,8 +64,8 @@ my $dsport = new Dialog ( my $self = shift; my $ans = shift; my $res = $DialogManager::SAME; - if ($ans !~ /\d+/) { - $self->{manager}->alert("dialog_dsport_error", $ans); + if ($ans !~ /^\d+$/) { + $self->{manager}->alert("dialog_dsport_invalid", $ans); } elsif (!portAvailable($ans)) { $self->{manager}->alert("dialog_dsport_error", $ans); } else { |
