mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
PostgreSQL Voicemail NULL password..Bug #546
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -269,7 +269,7 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, char *context, cha
|
||||
if (retval) {
|
||||
*retval->mailbox='\0';
|
||||
*retval->context='\0';
|
||||
*retval->password='\0';
|
||||
strcpy(retval->password, "NULL");
|
||||
*retval->fullname='\0';
|
||||
*retval->email='\0';
|
||||
*retval->pager='\0';
|
||||
@@ -319,7 +319,7 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, char *context, cha
|
||||
}
|
||||
for (i=0; i<numFields; i++) {
|
||||
fname = PQfname(PGSQLres,i);
|
||||
if (!strcmp(fname, "password")) {
|
||||
if (!strcmp(fname, "password") && !PQgetisnull (PGSQLres,0,i)) {
|
||||
strncpy(retval->password, PQgetvalue(PGSQLres,0,i),sizeof(retval->password) - 1);
|
||||
} else if (!strcmp(fname, "fullname")) {
|
||||
strncpy(retval->fullname, PQgetvalue(PGSQLres,0,i),sizeof(retval->fullname) - 1);
|
||||
|
Reference in New Issue
Block a user