Share

PHPix2 Photo Album

Tracker: Patches

5 mod to create __desc.txt files - ID: 479717
Last Update: Comment added ( bkilian )

I created a php form processor that takes the contents
of a text field and writes a [filename]_desc.txt file
in the correct location in relation to the file you
were viewing.

Now, the problem here is that there needs to be a way
to go into "admin mode" or something. The workflow
I've created is view an image as normal, and when I
get to one that doesn't have a _desc.txt file created
for it yet, I go to the http address bar in my browser
and change it from xxxx\view.php?xxxx to
xxx\view_admin.php?xxx

which isn't secure, so... I dunno what to say. it
works, but what can be done about the lack of
security? I don't know php that well to answer that
question. maybe a password that is set in config
file, and then along with the submit button, you need
to put in the password as well for the input to be
written to a file? Maybe...

Please pardon my icky code. it works, but it ain't
pretty.

-Steve


steve cooley ( stevecooley ) - 2001-11-08 19:43

5

Closed

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2004-06-17 21:25
Sender: bkilianProject Admin

Logged In: YES
user_id=129271

Feature now included in 2.1


Date: 2001-11-19 02:16
Sender: nobody

Logged In: NO

I'm thinking the easiest way would be:

if($PHP_AUTH_USER == "username" && $PHP_AUTH_PW ==
"pass") blah
else header('WWW-Authenticate: Basic
realm="Private"'); header('HTTP/1.0 401 Unauthorized');


Log in to comment.

Attached File ( 1 )

Filename Description Download
phpix2-mod_create_desc.zip mod to the view.php to create _desc.txt files. Download

Changes ( 3 )

Field Old Value Date By
status_id Open 2004-06-17 21:25 bkilian
close_date - 2004-06-17 21:25 bkilian
File Added 13031: phpix2-mod_create_desc.zip 2001-11-08 19:47 stevecooley