dashed-slug.net › Forums › General discussion › Error importing transactions
Tagged: csv, import transactions
- This topic has 5 replies, 2 voices, and was last updated 5 years, 12 months ago by alexg.
-
AuthorPosts
-
December 14, 2018 at 12:22 am #5244AnonymousInactive
hello, I have been importing transactions without problem but now when I try to import I receive this error.
“Failed to import file: Sorry, this file is not permitted for security reasons.”
Thank you very much and greetings.
Attachments:
You must be logged in to view attached files.December 14, 2018 at 11:04 am #5247alexgKeymasterHello,
I tested importing a
.csv
file and did not encounter the error with the latest version of the plugin and WordPress.You would normally get this error if WordPress was not allowed to receive this file type. The plugin normally uses the WordPress
upload_mimes
filter to white-list CSV files. Some thoughts:1. Are you certain that you are uploading a csv file? Perhaps the file has picked up another extension by accident? Please check.
2. The upload might be blocked by some other plugin, especially security plugins. Does the upload succeed if you deactivate other plugins?
3. As a workaround, you could try adding
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
to yourwp-config.php
file. If you do this you should be able to import your transactions, but you should then remove this constant again, for security reasons.Hope the above helps, but please let me know if it doesn’t.
with regards
December 14, 2018 at 11:51 am #5248AnonymousInactiveTwo days ago I was updated WP to version 4.9.9 automatically.
after the update I was able to import CSV without problem.
The problem appeared later without any type of update or plugin installation.
I have tried to load some recently downloaded csv file without modifying it and it gives the same error.
I have checked the plugins that I have installed and not any modification.
there is also a line up as with an error:
…. wallets / includes / transactions.php on line 1203
I would only have to try option 3 but I would not like to have a security problem.
December 14, 2018 at 1:04 pm #5250alexgKeymasterI understand.
The error on line 1203 is caused by WordPress not accepting the .csv file.
Are you using an administrator account to upload the transactions? If not, it might be worth a shot.
If all else fails, the option of setting
ALLOW_UNFILTERED_UPLOADS
is not a huge risk in my opinion, if you only have it set for the few seconds that it takes to upload the file. An attacker would have to use that time to set to upload some executable file, then use some other vulnerability to run it and somehow gain access.It’s your call.
December 14, 2018 at 1:15 pm #5251AnonymousInactiveproblem solved.
in the functions.php file I had to include “csv”
linea 2485
// Text formats.
‘txt|asc|c|cc|h|srt|csv‘ => ‘text/plain’,I found that other people have also succeeded in other pluging
good job, I’m happy with your plugin.
Thank you very much and greetings.
December 14, 2018 at 2:52 pm #5252alexgKeymasterGlad to hear you resolved this.
This is likely a solution specific to your theme, but thanks for reporting it in any case.
kind regards
-
AuthorPosts
- You must be logged in to reply to this topic.