rvelices wrote:
Yes: you need to protect your directory with a .htaccess, make sure you have enabled_high=false for everyone and make sure your original photos are larger than the biggest resize
Correction: It will not work if you have non photos (such as movies or zip files that require to be sent to browser ). However with some plugins and existing action.php it might work ...
Offline
@rvelices
I like your strap nodatabase, but can we imagin a configfile or another i.php, for allowing crypted request (crypted with the secret key...) ?
Offline
flop25 wrote:
@rvelices
I like your strap nodatabase, but can we imagin a configfile or another i.php, for allowing crypted request (crypted with the secret key...) ?
In order to do what ?
Offline
with [Subversion] r12802 and $conf['data_location'] is not possible to set _data on "private" directory. Like a directory not visible by http.
I know that I can used . .htaccess but with current version I liked to make difference between temporary data (templates, data plugin, ...) and visible data (combined, local data)...
For exemple, http:\\toto\Piwigo.
On server, there are:
───root
├───www
│ └───Piwigo
│ ├───local
│ │ ├───combined
│ │ │
│ │ └───i
├───tmp
│ └───_data
│ │ ├───templates_c
Offline
rub, please move your post into [Forum, topic 18582] "local" directory versus "_data" directory
Offline
rvelices, Piwigo currently (version 2.3) has an option to remove access to HD (user by user), but this is just a "display option" to remove the link to the HD : the HD remains reachable if you know the path pattern to the HD.
With Piwigo 2.4, this option also needs to be redesigned because "HD" doesn't mean the same. I think that a "maximum visible size" would be better but we keep the problem of the path pattern : if you know the path to the thumbnail, you can find the path to any other size.
What's your opinion about that? Do you think we can do something clean and more secure?
Offline
plg wrote:
What's your opinion about that? Do you think we can do something clean and more secure?
Not yet properly working with svn trunk but my target for securing originals will be a plugin that:
- adds .htacces in uploads/galleries deny from all
- implement two event handlers
get_element_url - will return action.php?part=e&id=1&view instead of get_root_url().row[path]
get_representative_url - will return action.php?part=r&id=1&view. instead of get_root_url().add_pwg_representative_inside(row[path])
Offline
rvelices wrote:
plg wrote:
What's your opinion about that? Do you think we can do something clean and more secure?
- implement two event handlers
get_element_url - will return action.php?part=e&id=1&view instead of get_root_url().row[path]
That doesn't sound enough for me if the visitor can still open _data/i/[path]-la.jpg : we also need .htacess into _data/i, don't you think?
Have you already made some performance test on action.php used for all thumbnail/photo etc? (I haven't and I wonder if it needs a lot of CPU/memory on server side)
Offline
plg wrote:
That doesn't sound enough for me if the visitor can still open _data/i/[path]-la.jpg : we also need .htacess into _data/i, don't you think?
My idea was not to protect _data/i - the webmaster could always allow only "small" resizes.
However this would work out of the box if you choose $conf['derivative_url_style']=2 (i.php) and if we finish the implementation i.php (look for // todo send pass-through )
plg wrote:
Have you already made some performance test on action.php used for all thumbnail/photo etc? (I haven't and I wonder if it needs a lot of CPU/memory on server side)
No tests done, but I would say - no CPU usage, rather heavy IO. Instead of apache using an optimized syscall for transferring data (checkout sendfile function), php reads the file and then outputs it (either quick if used as a php module or with extra IO as cgi/fcgi)
Offline
rvelices wrote:
flop25 wrote:
@rvelices
I like your strap nodatabase, but can we imagin a configfile or another i.php, for allowing crypted request (crypted with the secret key...) ?In order to do what ?
like Pierrick I was thinking of " the problem of the path pattern : if you know the path to the thumbnail, you can find the path to any other size.".
I also was thinking about adding other location of pictures, how to secure it (I was focusing of hiding the path, but adding an htaccess is much easier) : we could specify any path to i.php (ex public_html/blabla/mypic/ ) and generate the multisized pics in _data/i/blabla/mypic/
Offline
You have already thought about this, but I asked myself why we need to remove the Remote Sites : can you explain why we can't check if http://mysite/_data/mypicture-tn.jpeg exists and call the distant i.php?etc to generate it ? I'm sorry if it appears as a stupid question for you, I'm certainly missing something
Offline
rvelices wrote:
The remaining things to do (in order of importance from my point of view) are:
c. review upload (forms + ws)?
Done for upload form and pwg.images.addSimple. Still under review for pwg.images.add.
Offline
plg wrote:
Done for upload form and pwg.images.addSimple. Still under review for pwg.images.add.
You can still cleanup in functions_upload
'tn_ext' => 'jpg',
if (isset($high_infos))
{
$insert['has_high'] = 'true';
$insert['high_filesize'] = $high_infos['filesize'];
$insert['high_width'] = $high_infos['width'];
$insert['high_height'] = $high_infos['height'];
}
in file_path_for_type the only acceptable $type parameters should be 'original' and 'representative' (if the added element is not a picture)
Offline
I'm implementing the "update file" algorithm and I'm searching the deleteDerivative function you had described me. I don't find it. Is it in the TODO list or did I miss it?
Offline
plg wrote:
I'm implementing the "update file" algorithm and I'm searching the deleteDerivative function you had described me. I don't find it. Is it in the TODO list or did I miss it?
it's in the todolist you can put sth like
function delete_element_derivatives($infos)
{
// todo
}
in admin functions.inc.php and call it ...
Offline