Pay-per-download : how to prevent downloading ?

Author Message

Pascal France

Friday 18 March 2011 11:25:03 am

Hi,

I'm using the pay-per-download extension (eZP 4.3 on a shared host) and once the user payed his products (PDFs) the system displays a summary of the purchases.

In this summary there are links pointing to the PDFs; the form of these links is: http://mysite.fr/content/download/4877/23065

The probleme is that this link works even if one is not logged in. So it can be shared without limit.

Is there a workaround ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Peter Keung

Friday 18 March 2011 4:14:58 pm

content/download links should respect eZ Publish permissions. Have you tested those links in a separate browser or after closing and re-opening the browser? It is likely the browser cache that is letting you download the file even after logging out.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Pascal France

Friday 18 March 2011 4:42:40 pm

Hi Peter,

Thinks for your reply.

I'm stupid ! I gave the anonymous role the rights to read my PDFs........

Now all works as expected.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:07:16
Script start
Timing: Jan 18 2025 02:07:16
Module start 'layout'
Timing: Jan 18 2025 02:07:16
Module start 'content'
Timing: Jan 18 2025 02:07:16
Module end 'content'
Timing: Jan 18 2025 02:07:16
Script end

Main resources:

Total runtime0.6002 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1641152.6563
Module start 'layout' 0.00500.0025 740.820339.5156
Module start 'content' 0.00750.5908 780.3359531.7813
Module end 'content' 0.59830.0019 1,312.117212.2656
Script end 0.6002  1,324.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4936160.0002
Check MTime0.00120.2080160.0001
Mysql Total
Database connection0.00080.127310.0008
Mysqli_queries0.555292.4914570.0097
Looping result0.00050.0804550.0000
Template Total0.574995.820.2874
Template load0.00180.294920.0009
Template processing0.573195.480320.2866
Template load and register function0.00020.029310.0002
states
state_id_array0.00070.117910.0007
state_identifier_array0.00120.205920.0006
Override
Cache load0.00140.2280180.0001
Sytem overhead
Fetch class attribute can translate value0.00050.088320.0003
Fetch class attribute name0.00280.465340.0007
XML
Image XML parsing0.00070.124620.0004
class_abstraction
Instantiating content class attribute0.00000.001740.0000
General
dbfile0.00130.2085170.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs