Password protected albums?

valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 18:00

login and album passwords are different things.

if you choose to use the album passwords, then users are asked to enter this specific password when clicking on the album.
but if the album item is still non-public, users will have to login to see that album.

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Fri, 2005-11-25 18:43

Well, My album is public. I was under the impression that it didnt matter if you were logged in or not, it would ask for a password and grant you access if you had the right password.

I have attached a picture of what comes up when I try to enter a public album, under password protection. It asks for a username and a password. I have tried many different combos, no success. Does anyone know what the username is? maybe its the same for all pass-protected albums, since it dosnt require you to specify a username. Leaving username blank dosnt work either.

Thanks for the help. This would be great to see work...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 19:43

so, i had to install the module to see what i'm talking about.

ok, enter anything as username and enter the album password as password in this authentication popup.

it works for me.

e.g.
- i leave the username field empty, and enter the correct album password in the password field.
- or i enter blablabla in the username field, and enter the correct album password in the password field.
the popup disappears, the page refreshes and shows the album

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Fri, 2005-11-25 20:15

Hmm... It just seems to not accept the input. And then askes again, and in the IE case, after three attemps it just says : Unauthorized!

I will play some more. Could this be a web browswer setting maybe?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 20:24

no, i tried it in IE and FF.

make sure you're not using caps-lock (keyboard ;) ).
and make sure you're entering the correct password. maybe start with something as simple as "hello".

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Fri, 2005-11-25 20:34

that is odd. I am using ver1.5.2, not sure of the release.... could that be the problem? maybe I need the most up to date version of Gallery.

I just installed it about 2 weeks ago, so I hope that I have the most current...however I know stuff happens..maybe I d/l an older copy.

Thanks for the quick responses.

Nick

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 20:38

this is a G2 forum, discussing the G2 albumpasswd module.

v1.5.2 can only be Gallery 1. so try it in the G1 forums.

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Fri, 2005-11-25 21:18

Sorry... That is my wordpress version...please excuse. I am running Gallery 2.

What version of the module did you run? I am running 0.8.1

It still just keeps asking for the password and never lets me in.

I have even tried this module on another site of mine, which is pretty much a straight install not many modifications... no go.

I even tried lowering all my browsers security settings, still nothing. I guess its not a browser problem.

I'll leave this album up hopefully we can figure this out:
http://www.nickyu.com/gallery/main.php?g2_view=core.ShowItem&g2_itemId=913

give it a try on your computer...the password is 'hello'

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 22:15

yes, i tried version 0.8.1 of albumpasswd.

your site doesn't work for me either.
please post a phpinfo link.

FAQ: What information is required when I ask for help in the forums?

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Fri, 2005-11-25 22:32

Ok, here is the file requested. Sorry I didnt have it ready in the first place, I am noob to all this stuff.

www.nickyu.com/phpinfo.php

Thanks for all the help.
Let me know if there is anything else you require.

Nick

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-25 22:43

maybe it doesn't work for all php-cgi.
i guess you can forget this module right now, it won't work for you.

http://www.php.net/manual/en/features.http-auth.php

 
nickyu

Joined: 2005-10-31
Posts: 25
Posted: Sat, 2005-11-26 00:38

Oh well :) Hopefully a full blown plug-in will be made :)

I will vote for it now!

Thanks for your time...much appreciated.

Nick

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-11-26 17:52

Hidden items from gallery-contrib on sourceforge will make this module obsolete, I think. I haven't tried it to see how the password is requested.. if http-auth then it will have the same php-cgi problem as albumpasswd.

 
camjo

Joined: 2005-12-03
Posts: 3
Posted: Sat, 2005-12-03 18:25

Hi,

is it possible to make it form-based, instead of the popup-auth window?

/camjo

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-12-04 03:30

it's probably possible. i've just started looking at the SoC code.. we'll see what we've got.

 
beardoc

Joined: 2002-11-10
Posts: 6
Posted: Sun, 2005-12-04 04:18

Has anything been done about this? I'm on PHP-CGI, and I have the same problem mentioned in this script. Has it been refined recently - did the SoC work yield anything?

 
camjo

Joined: 2005-12-03
Posts: 3
Posted: Sun, 2005-12-04 09:39

@mindless
thanks, hope you make it!

 
camjo

Joined: 2005-12-03
Posts: 3
Posted: Tue, 2005-12-27 12:21

@mindless
have you made any progress?

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 73
Posted: Tue, 2005-12-27 17:41

What about a preformated URL which incorporates a crypted username and a password. So when you click the link, which could be put in an email or on a page, you are logged in and can see the album(s). This approach shouldn´t be problem for the G2 permission system. This user should of course not be able to change his own password. To make things comfortable there could be a php script which automatically creates such a user and the crypted link.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-12-28 15:16

camjo, only enough to see that the code needs some work before integrating.

 
mikjus
mikjus's picture

Joined: 2005-10-14
Posts: 17
Posted: Wed, 2006-01-18 12:21

Any help on making albumpasswd to work with gallery 2.1? Upgraded without making database badckups and now im stuck with this error ->
Fatal error: Class 'GalleryStatus' not found in C:\Apps\Apache2\htdocs\gallery2\modules\albumpasswd\module.inc on line 98

Dont quite undestand php but this link points to instruction to change code.

http://codex.gallery2.org/index.php/Gallery2:API_Changes_Since_The_Last_Release#6.10_.3D.3E_7.0

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-01-18 17:57

i have started on the new password module, using session based permissions.. just work in progress at this point. hope to have more in the next couple weeks.

(mikjus, if you want to update the old albumpasswd code look for the convert.pl script from that link... or wait for the new module)

 
mikjus
mikjus's picture

Joined: 2005-10-14
Posts: 17
Posted: Thu, 2006-01-19 06:25
mindless wrote:
i have started on the new password module, using session based permissions.. just work in progress at this point. hope to have more in the next couple weeks.

(mikjus, if you want to update the old albumpasswd code look for the convert.pl script from that link... or wait for the new module)

How can i run that script on windows 2003 based server? Or can anyone supply modified code?

I'm glad to hear that you are working on new version. I'm not using user accounts with my gallery so its easy to protect some albums with password.

 
mikjus
mikjus's picture

Joined: 2005-10-14
Posts: 17
Posted: Thu, 2006-01-19 06:47

Forget it. Just got it running! Found activeperl for windows and managed to run that script. Now everything is up and running. Thanks for help.

 
phrog

Joined: 2006-01-20
Posts: 11
Posted: Fri, 2006-01-20 21:56

How did ya do that?

 
khaman

Joined: 2006-01-08
Posts: 15
Posted: Tue, 2006-01-31 09:54

Hmm it doesn't work for me either. I get errors:

Error (ERROR_BAD_PLUGIN) : Class albumpassModule does not exist

    * in modules/core/classes/helpers/GalleryPluginHelper_simple.class at line 113 (gallerystatus::error)
    * in modules/core/classes/GalleryCoreApi.class at line 187 (gallerypluginhelper_simple::loadplugin)
    * in modules/core/AdminModules.inc at line 227 (gallerycoreapi::loadplugin)
    * in modules/core/SiteAdmin.inc at line 153 (adminmodulesview::loadtemplate)
    * in modules/core/classes/GalleryTheme.class at line 688 (siteadminview::loadtemplate)
    * in modules/core/classes/GalleryView.class at line 285 (classictheme::loadtemplate)
    * in main.php at line 287 (siteadminview::doloadtemplate)
    * in main.php at line 87
    * in main.php at line 80

Hope you will be able to make it work in next version.

--------------------------

Gallery URL: works in progress
Gallery version: 2.02
Apache version: Apache/2.0.50
PHP version: 4.3.8
Graphics Toolkit: gd
Operating system: SUSE Linux

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-31 10:33

a cleaned up password module is in the latest nightly snapshot of g 2.1.
get the g2 "2.1-soon" version from jesse mullan's nightly snapshot server.

 
khaman

Joined: 2006-01-08
Posts: 15
Posted: Tue, 2006-01-31 20:13

vialant, I understand updating Gallery to 2.1-soon-nightly helps? This version is stable? Is the password module already included?


Gallery URL: galeria.khaman.net
Gallery version: 2.02
Apache version: Apache/2.0.50
PHP version: 4.3.8
Graphics Toolkit: gd
Operating system: SUSE Linux

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-31 23:10

? what did i say in my last post?? yes.
@stable:
pretty

 
khaman

Joined: 2006-01-08
Posts: 15
Posted: Thu, 2006-02-02 13:21
valiant wrote:
pretty

:D

OK thanks.

 
Jihad

Joined: 2006-02-12
Posts: 1
Posted: Sun, 2006-02-12 02:06

Terrific module. thanks for everyone that worked and publicized it.

There is a way to get around it though through playing with the urls somehow (I'm not gonna say how though. if you're a developer email me).

I found the fix to be changing the following line in module.inc, [line 91]:

Quote:
if ($view == 'core.ShowItem') {

to be:

Quote:
if (($view == 'core.ShowItem') || ($view == 'core.DownloadItem')) {

This will protect your images even if you allow hotlinking.

I hope this can be tested further and added to the hosted file.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-02-12 02:17

obviously you're not using the module that is in G2.1 RC1 / current nightly snapshot, because the code is different from the module posted in this thread.

please try the latest nightly snapshot and if you find a security issue, file it at security at menalto.com, if it's just a bug, file it on http://sf.net/project/gallery/
thanks.

 
browncr

Joined: 2006-03-03
Posts: 3
Posted: Thu, 2006-03-09 04:48

I have a problem. I have installed Gallery 2.1rc 1a-full. When I tried to add the Albums Password, the Checkout and Checkout by email I get this message for all 3:
Incompatible module!
Core API Required: 6.4 (available: 7.1)
Module API Required: 2.0 (available: 3.0)

Please help.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-03-09 06:14

read the posts above.. albumpasswd module is obsolete, 2.1 includes new password module.
ask elsewhere for the other two to see if they have been updated for 2.1.