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/DSCreate.pm.in | |
| 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/DSCreate.pm.in')
| -rw-r--r-- | ldap/admin/src/scripts/DSCreate.pm.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in index dcd55afb..a156f108 100644 --- a/ldap/admin/src/scripts/DSCreate.pm.in +++ b/ldap/admin/src/scripts/DSCreate.pm.in @@ -82,6 +82,9 @@ sub checkPort { } } + if ($inf->{slapd}->{ServerPort} !~ /^\d+$/) { + return ('error_port_invalid', $inf->{slapd}->{ServerPort}); + } if (!portAvailable($inf->{slapd}->{ServerPort})) { return ('error_port_available', $inf->{slapd}->{ServerPort}, $!); } |
