[Greater-commits] r331 - trunk/GREAT-ER-DB/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 30 14:08:41 CEST 2011
Author: bricks
Date: 2011-06-30 14:08:39 +0200 (Thu, 30 Jun 2011)
New Revision: 331
Modified:
trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
Log:
Check username in connect admin function
Modified: trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-30 12:07:31 UTC (rev 330)
+++ trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-30 12:08:39 UTC (rev 331)
@@ -4294,6 +4294,13 @@
if(!db_con)
return (DA_FAIL);
+ if (!lgda_check_username(vp_userid)) {
+ vp_errinfo->err_type = DA_ERRTYP_PG;
+ vp_errinfo->err_no = DA_ERR_INVALID_USERNAME;
+ sprintf(vp_errinfo->err_param, "%s - invalid username. (%s)", v_module, vp_userid);
+ return NULL;
+ }
+
lgda_set_connection_values(db_con, vp_connect_descr,
vp_userid, vp_passwd, vp_errinfo);
More information about the Greater-commits
mailing list