Skip to content

Outbound Routes: Uploaded csv-file is not deemed valid csv (Fixed) #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2025

Conversation

hannes427
Copy link
Contributor

In special circumstances a uploaded csv-file with dial patterns is not recognized as valid, because some browsers send another mime-type. This PR removes the check if a csv-file was uploaded based on the mime type and adds a check if the uploaded file is in the correct format for FreePBX 16.

Fixed missing declaration of variables

Bugfix FreePBX/issue-tracker#678

In special circumstances a uploaded csv-file with dial patterns is not recognized as valid, because some browsers send another mime-type.
This PR removes the check if a csv-file was uploaded based on the mime type and adds a check if the uploaded file is in the correct format for FreePBX 16.

Fixed missing declaration of variables

Bugfix FreePBX/issue-tracker#678
In special circumstances a uploaded csv-file with dial patterns is not recognized as valid, because some browsers send another mime-type. This PR removes the check if a csv-file was uploaded based on the mime type and adds a check if the uploaded file is in the correct format for FreePBX 16.

* Modified regex, so that the header is optional in the csv-file
* Removed fopen()/fgetcsv() of the uploaded file to prevent reading it
  twice
* Adjust code style

Bugfix FreePBX/issue-tracker#693
@kguptasangoma kguptasangoma merged commit 5dcdeab into FreePBX:release/16.0 Apr 22, 2025
1 check passed
@hannes427 hannes427 deleted the csv-upload16 branch April 22, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants