Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a members only site running WordPress and a stock images gallery running an old php gallery CMS. I want the members to only have to login once but I want to protect the gallery from the general public. I trust my members so I don't need anything spectacularly secure. I was thinking about using an iframe that auto logs into the gallery folder via HTTP authentication. Is this possible (if so how) or is there a better method?

share|improve this question
add comment

1 Answer

Your iframe method could work. You could extract the usernames and hashed passwords from the wordpress database and use them to create usernames and passwords on your gallery. The method for this would depend on what sort of server you have.

You would then need to hack Wordpress to create an iframe with the source link having the username and hashed password embedded in it like this:

http://username:password@example.com/gallery

Another method would be to tweak the php gallery so that it only works for certain unguessable URLs, and generate one of those for each user such as a hash of their username.

http://example.com/gallery/848f16b2c71813dde3479f77dd1b49d5

This would mean less tweaking of Wordpress (no diving into the database) but more tweaking of your gallery CMS>

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.