Membership media complete protection not working

I’ve just enabled media protection for subscription levels and discovered that only basic protection is working correctly (I see a modified link and I can download my test pdf).

If I change protection level to “complete protection” I get a 403 error page when trying to download a pdf.

After enabling “hybrid protection” I get a “no access” image instead of a pdf file.

Is there any solution to fix this?

  • Timothy
    • Chief Pigeon

    Hey there.

    I’ve just enabled media protection for subscription levels and discovered that only basic protection is working correctly (I see a modified link and I can download my test pdf).

    So you can download when on a level which doesn’t have access?

    Or are you logged into an account with access or the admin account?

    After enabling “hybrid protection” I get a “no access” image instead of a pdf file.

    The image is usually the expected behaviour if they try to download something which is protected and through the membership generated link.

    Take care.

  • eshopbusiness
    • Site Builder, Child of Zeus

    Thanks for response, Timothy

    So you can download when on a level which doesn’t have access?

    I’ve created test user and added him a subscription I’m currenlty configuring. Expected behaviour is successful download regardless of the protection method type.

    In fact, only basic protection works as I expected. So the user with appropriate access rights can download, others can’t.

    When I switch to complete or hybrid protection my test user failed to download my pdf file.

  • Timothy
    • Chief Pigeon

    Hey again.

    And you’d rather use complete or hybrid then?

    Basic masks your media directory but leaves any filenames the same.

    Complete masks the media directory and changes the image filename as well

    Hybrid is for use if you are using a host or server that has a problem with the system (such as some installs of nginx).

    The hybrid was added for ngix as some servers were just not working with complete before.

    Could you let us know more about your server setup please.

    You’re running the latest Membership version?

    You could also try the new beta here:

    https://premium.wpmudev.org/forums/topic/membership-343-beta

    If you can test the new beta and if there are still issues then please post direct to that thread for our developer Barry. He is working on ironing out any issues in that thread.

    Thanks.

  • eshopbusiness
    • Site Builder, Child of Zeus

    I’d prefer protection where path to the file is masked completely (no date and month) and filename is not changed. Or, alternatively, leave the path and the file name intact but without ability to use this path by users without proper subscription level.

    Is that possbile?

  • Timothy
    • Chief Pigeon

    Hey again.

    I’d prefer protection where path to the file is masked completely (no date and month) and filename is not changed.

    If the filename is not changed then Basic will be fine here as that masks the path and leaves the file name.

    Or, alternatively, leave the path and the file name intact but without ability to use this path by users without proper subscription level.

    Is that possbile?

    The plugin wouldn’t expose the full path to the download as this would then allow people to download the file. You see it wouldn’t then be processed by PHP so wouldn’t be protected.

    As Basic is working for you and that’s all you need as described in your last post then you can leave it on there. You said Basic was working before.

    If you need complete or Hybrid (which is complete but for nginx) then we’d need to debug further.

    Take care.

  • eshopbusiness
    • Site Builder, Child of Zeus

    To be honest, I’d be happy to have protected links like that: http://site.com/members-only/self-explanatory-file-name.pdf instead of http://site.com/members-only/233445.pdf (file name is changed) or http://site.com/members-only/2013/01/self-explanatory-file-name.pdf. Last link type reveals a date of file uploading which is undesirable in my case.

    Maybe this will work if I manually create subfolder in /wp-content/uploads/ and then upload files that have to be protected?

    However I didn’t find plugin which is capable of doing this together with adding a file to a Media Library. Please let me know if you know plugin for that.

  • Timothy
    • Chief Pigeon

    Well even with Basic on the path to the file is defined by the “Masked download URL” field.

    The /wp-content/uploads/ is only seen if you hand that direct link out to people which you don’t need to.

    When you insert a protected media item in a page your members see the Masked Download URL.

    So because they only see the Masked URL they won’t have the direct url. You can also change the path to your /wp-content/ folder if you really wanted but it shouldn’t make much difference:

    http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

    Take care.

  • Timothy
    • Chief Pigeon

    Then you definitely need hybrid or complete as that’s how the Basic goes.

    I think the best thing is really to give that beta ago if you hadn’t:

    https://premium.wpmudev.org/forums/topic/membership-343-beta

    And if Barry hasn’t fixed the issue there, then post direct to that thread. By your last post it seems you really do need/want complete protection and so getting the plugin to do that would get you the result.

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.