[PATCH] pglister: auth_receive: Indicate when PGAUTH_KEY is invalid instead of crashing - Mailing list pgsql-www

From Célestin Matte
Subject [PATCH] pglister: auth_receive: Indicate when PGAUTH_KEY is invalid instead of crashing
Date
Msg-id 4b46c25f-29df-e9c9-8217-f70729a1f852@cmatte.me
Whole thread Raw
Responses Re: [PATCH] pglister: auth_receive: Indicate when PGAUTH_KEY is invalid instead of crashing  (Célestin Matte <celestin.matte@cmatte.me>)
List pgsql-www
When Django is improperly configured with a PGAUTH_KEY that does not match the one configured in pgweb, the decryptor
returnsa string that can't be utf-8-decoded. Catching this error makes it possible to return a proper error message
insteadof a 500 error.
 
Of course, the unicode error can be due to other issues (e.g. tempered GET parameters), but wrong PGAUTH_KEY is the
morelikely issue to happen when configuring pglister.
 

Patch attached.
-- 
Célestin Matte
Attachment

pgsql-www by date:

Previous
From: Andreas 'ads' Scherbaum
Date:
Subject: Managing organizations
Next
From: Jared Brogan
Date:
Subject: Wiki editor request