Opened 15 years ago
Closed 14 years ago
#2912 closed defect (fixed)
Joins do not accept crypted passwords
Reported by: | mko | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | MapServer C Library | Version: | 5.2 |
Severity: | normal | Keywords: | join crypt |
Cc: | morissette, mko, sdlime |
Description
A JOIN can not have an encryped password in its connection string:
LAYER DATA "prov.shp" JOIN CONNECTION "host=127.0.0.1 port=5432 user=postgres password={XXXXXX} dbname=join" # will not work END
Solution: add msDecryptStringTokens()
to the *JoinConnect functions:
//mappostgresql.c, msPOSTGRESQLJoinConnect(), line 119: /* Establish database connection */ char *conn_decrypted; conn_decrypted = msDecryptStringTokens(layer->map, join->connection); if (conn_decrypted != NULL) { joininfo->conn = PQconnectdb(conn_decrypted); } //mapjoin.c, msMySQLJoinConnect(), line 579: char *conn_decrypted; conn_decrypted = msDecryptStringTokens(layer->map, join->connection); if (conn_decrypted == NULL) { return(MS_FAILURE); /* An error should already have been produced */ } delim = strdup(":"); DB_HOST = strdup(strtok(conn_decrypted, delim));
Change History (3)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Milestone: | 5.4 release → 5.4.1 release |
comment:2 by , 14 years ago
Cc: | added |
---|---|
Milestone: | 5.6 release → 6.0 release |
Owner: | changed from | to
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed and committed in r9589.