I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Error importing transactions

dashed-slug.net Forums General discussion Error importing transactions

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5244
    Anonymous
    Inactive

    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.
    #5247
    alexg
    Keymaster

    Hello,

    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 your wp-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

    #5248
    Anonymous
    Inactive

    Two 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.

    #5250
    alexg
    Keymaster

    I 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.

    #5251
    Anonymous
    Inactive

    problem 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.

    #5252
    alexg
    Keymaster

    Glad to hear you resolved this.

    This is likely a solution specific to your theme, but thanks for reporting it in any case.

    kind regards

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.