[mod_python] Bizarre problems with rewriting URLs?

Aaron Gallagher habnabit at gmail.com
Mon Oct 16 00:24:16 EDT 2006


The URL is generally any URL as long as it ends in /editor/. I don't  
think it happens anywhere else.

def authenhandler(req):
	if get_prefix(req): return apache.OK # This fetches the database  
prefix from a PythonOption.
	global conn
	conn = MySQLdb.connect(**cparams)
	global curs
	if curs: curs.close()
	curs = conn.cursor()
	user = req.user
	pw = req.get_basic_auth_pw()
	# fetch the salted hash and an administrative flag from an SQL database
	if not fetchedpw:
		return 401
	hash = sha.sha()
	hash.update(pw)
	if crypt.crypt(hash.hexdigest(), fetchedpw) != fetchedpw:
		return 401
	if user == PREFIX or isadmin:
		return apache.OK
	return 403


On Oct 15, 2006, at 9:16 PM, Graham Dumpleton wrote:

> What does your authenhandler do? Does it try and send back its own
> complete response? If it does, what is the result it is providing? Can
> you take out any secret bits and post it?
>
> Also, what is the actual URL you are using when are making the
> request that sends back multiple headers?

Aaron Gallagher
<habnabit at gmail.com>




More information about the Mod_python mailing list