Fix XSS vulnerability, when import is using a file upload without a valid LDIF. Also fixes #250 and closes #251
This commit is contained in:
parent
528081d909
commit
d59cbfef5d
@ -103,7 +103,7 @@ function display_pla_parse_error($request) {
|
||||
printf('<tr><td colspan=2><b>%s</b>:</td></tr>',_('Data'));
|
||||
|
||||
foreach ($request->error['data'] as $line)
|
||||
printf('<tr><td> </td><td>%s</td></tr>',$line);
|
||||
printf('<tr><td> </td><td>%s</td></tr>',htmlspecialchars($line));
|
||||
|
||||
echo '</table>';
|
||||
echo '</center>';
|
||||
|
@ -660,6 +660,8 @@ class Template extends xmlTemplate {
|
||||
# If container is not set, we're probably creating the base
|
||||
elseif ($this->getRDN() && get_request('create_base'))
|
||||
return $this->getRDN();
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getDNEncode($url=true) {
|
||||
|
@ -175,7 +175,9 @@ class ImportLDIF extends Import {
|
||||
return $this->error(sprintf('%s %s',_('LDIF import only suppports version 1'),$version),$lines);
|
||||
|
||||
$haveVersion = true;
|
||||
$lines = $this->nextLines();
|
||||
|
||||
if (! $lines)
|
||||
$lines = $this->nextLines();
|
||||
}
|
||||
|
||||
$server = $this->getServer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user