Fix FLEXIAPI-351 Fix import of CSV generated on Windows

This commit is contained in:
Timothée Jaussoin 2025-07-08 14:24:02 +00:00
parent 41e754b424
commit 33373be186
2 changed files with 4 additions and 1 deletions

View file

@ -60,6 +60,7 @@ v2.0
- Fix FLEXIAPI-342 Enforce password change when the External Account domain is changed
- Fix FLEXIAPI-346 Complete the supporting text for the provisioning ini field
- Fix FLEXIAPI-350 Fix wrongly assigned variables in some views
- Fix FLEXIAPI-351 Fix import of CSV generated on Windows
v1.6
----

View file

@ -67,7 +67,9 @@ class AccountImportController extends Controller
$lines = collect();
$this->errors['Wrong file format'] = "The number of columns doesn't matches the reference file. The first MUST be the same as the reference file";
if ($line == "Username,Password,Role,Status,Phone,Email,External Username,External Domain,External Password,External Realm, External Registrar,External Outbound Proxy,External Protocol\n") {
$firstLine = 'Username,Password,Role,Status,Phone,Email,External Username,External Domain,External Password,External Realm, External Registrar,External Outbound Proxy,External Protocol';
if (substr($line, 0, strlen($firstLine)) == $firstLine) {
$lines = $this->csvToCollection($request->file('csv'));
unset($this->errors['Wrong file format']);
}