dirkjan at ochtman.nl
Tue Dec 14 14:15:31 CST 2010
On Tue, Dec 14, 2010 at 08:12, praveen_m86 <praveen_m86 at rediffmail.com> wrote:
> I am currently learning about publishing repositories with
> mercurial. I am actually trying to replace the code
> user = req.env.get('REMOTE_USER') in hgwebidir_mod.py file with my personal
> db authentication mechanism.
> Instead of having the folder where my hgwebdir.cgi resides as apache
> protected and getting the valid user through basic authentication, i am
> trying to get the user name and the password through the raw_input() in
> method and checking with the db or even with my htpasswd file for user
> authentication purpose and setting the user variable if the user is valid or
> throwing an error if not. But raw_input function seems to be not working
> inside this file. Import MySQLdb also doesnt work. Wat could be the reason,
> is it possible to have this personal authentication idea implemented by
> modifying this file ?.
It doesn't sound like you have a whole lot of experience doing this
kind of thing. raw_input(), last time I checked, reads from stdin
only, and is thus not very useful for webapps (I have no actual clue
how it would interact with CGI-based WSGI, but probably not that
What is the actual reason you don't want to protect the directory
where the hgwebdir.cgi resides?
More information about the Mercurial-devel