mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Remove typmod checking from the recent security-related patches. It turns
out that ExecEvalVar and friends don't necessarily have access to a tuple descriptor with correct typmod: it definitely can contain -1, and possibly might contain other values that are different from the Var's value. Arguably this should be cleaned up someday, but it's not a simple change, and in any case typmod discrepancies don't pose a security hazard. Per reports from numerous people :-( I'm not entirely sure whether the failure can occur in 8.0 --- the simple test cases reported so far don't trigger it there. But back-patch the change all the way anyway.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.143 2007/02/02 00:07:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.144 2007/02/06 17:35:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -632,10 +632,7 @@ ExecBuildProjectionInfo(List *targetList,
|
||||
break;
|
||||
}
|
||||
attr = inputDesc->attrs[variable->varattno - 1];
|
||||
if (attr->attisdropped ||
|
||||
variable->vartype != attr->atttypid ||
|
||||
(variable->vartypmod != attr->atttypmod &&
|
||||
variable->vartypmod != -1))
|
||||
if (attr->attisdropped || variable->vartype != attr->atttypid)
|
||||
{
|
||||
isVarList = false;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user