Last modified: 2014-10-16 12:27:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56968, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54968 - LdapAuthentication can generate bad DNS request due to not triming leading blanks from servernames
LdapAuthentication can generate bad DNS request due to not triming leading bl...
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
LdapAuthentication (Other open bugs)
unspecified
All Solaris
: Lowest normal (vote)
: ---
Assigned To: Ryan Lane
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 11:59 UTC by Peter Karlsson
Modified: 2014-10-16 12:27 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Peter Karlsson 2013-10-04 11:59:59 UTC
The leading " " that currently is generated can cause bad DNS request for hostname=0, this can easily be fixed by adding an ltrim after the rtrim on line 571

$servers = "";
$tmpservers = $this->getConf( 'ServerNames', $domain );
$tok = strtok( $tmpservers, " " );
while ( $tok ) {
	$servers = $servers . " " . $serverpre . $tok . ":" . $this->getConf( 'Port', $domain );
	$tok = strtok( " " );
}
$servers = rtrim( $servers );
$servers = ltrim( $servers );
Comment 1 Sam Reed (reedy) 2014-10-16 12:27:08 UTC
$servers = trim( $servers );

No point doing ltrim() and rtrim() seperately

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links