diff --git a/htdocs/import.php b/htdocs/import.php
index 22d7ee2d..f87fa24e 100644
--- a/htdocs/import.php
+++ b/htdocs/import.php
@@ -103,7 +103,7 @@ function display_pla_parse_error($request) {
printf('
%s: |
',_('Data'));
foreach ($request->error['data'] as $line)
- printf(' | %s |
',$line);
+ printf(' | %s |
',htmlspecialchars($line));
echo '';
echo '';
diff --git a/lib/Template.php b/lib/Template.php
index 96e184f7..9eb3a88b 100644
--- a/lib/Template.php
+++ b/lib/Template.php
@@ -660,6 +660,8 @@ public function getDN() {
# 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) {
diff --git a/lib/import_functions.php b/lib/import_functions.php
index 84177215..685676f8 100644
--- a/lib/import_functions.php
+++ b/lib/import_functions.php
@@ -175,7 +175,9 @@ public function readEntry() {
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();