forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Bart on March 12, 2004, 01:13:13 am

Title: [security] user can't know location photo
Post by: Bart on March 12, 2004, 01:13:13 am
I have problem becouse I don't want to user clicking right button mouse's on photo had the possibility of checking where is photo on server. Now has the possibility to write down address of photo and he can see it with out log in.:( Have You some ideas how I can solve this problem  :?:
Title: [security] user can't know location photo
Post by: Joachim Müller on March 12, 2004, 08:12:25 am
sure: don't post the pic on the internet! :roll:
That's the way a webbrowser works. You could try fiddling with "no right-click" scripts (using JavaScript) and other silly methods, but generally speaking: there is nothing you can do about this!

GauGau
Title: [security] user can't know location photo
Post by: Tarique Sani on March 12, 2004, 08:55:02 am
May be this is what you want

http://forum.coppermine-gallery.net/index.php?topic=3069
Title: [security] user can't know location photo
Post by: hyperion on March 12, 2004, 08:59:16 am
Anyone can get to your files if they really want to, so you can only make it difficult.

For example, you worry that people will be able to see your files without logging in.  Okay, so what do you do if a user logs in and downloads your files? He can then view them on his personal computer, post them on his site, etc.  Right click scripts can be disabled, and URL obsfucation is made irrelevant by the browser cache. If they can see it in their browser, they can get it.

However, if you are determined to proceed along this futile course, I suggest you read the following threads and pages:

http://forum.coppermine-gallery.net/index.php?topic=3069 [edit]Seems you beat me to it, Tarique.  :) [/edit]
http://forum.coppermine-gallery.net/index.php?topic=2450
http://altlab.com/htaccess_tutorial.html
Title: [security] user can't know location photo
Post by: Casper on March 12, 2004, 11:57:14 am
And you could make it that users have to login before they can see any pics.  There's no point in worying if the user is registered anyway, is there.

see http://forum.coppermine-gallery.net/index.php?topic=3503
Title: [security] user can't know location photo
Post by: Bart on March 16, 2004, 04:03:47 pm
OK guys ... calmly ... I need solution with .htaccess and login to gallery or any good way. I want users can save photos on they hard drivers but I don't want they post link to jpg file somewhere and someone no register user can see that jpg file. For example user who have account login to gallery and get link to jpg file and he/she put that link on another site then anyone can have access to my photo - I don't want that so how I can do it?

What You think about it:

Code: [Select]

<?php 
if (!isset($_COOKIE['ActiveCode'])) { 
    unset(
$_COOKIE[session_name()]); 
    
$name 'access.denied.jpg'

else { 
   if (isset(isset(
$_GET['name']))) { 
      
$name $_GET['name']; 
   } 
   else { 
      
$name 'some.jpg'
   } 


$photo_dir 'secret_catalog/'

$name $photo_dir $name

header('Content-type: image/jpeg'); 
header('Content-transfer-encoding: binary'); 
header('Content-length: 'filesize($name)); 

readfile($name); 
?>
Title: [security] user can't know location photo
Post by: Joachim Müller on March 16, 2004, 05:44:43 pm
If you want to keep people from displaying your pics on their site (stealing your bandwidth), there are instructions how to prevent this: search the board for "prevent AND hotlinking".
You can't keep people from entering the url of the pic into the browser though.

GauGau
Title: [security] user can't know location photo
Post by: Bart on March 16, 2004, 09:19:10 pm
Quote from: "gaugau"

You can't keep people from entering the url of the pic into the browser though.

GauGau


I can  :D  and I know how!
Title: [security] user can't know location photo
Post by: Joachim Müller on March 17, 2004, 08:42:47 am
OK, cool. Thanks for sharing your thoughts...
Maybe you could post a link to your gallery for us to check your modifications...?

GauGau