forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5c06abb
committed
Validate the OID argument of pg_import_system_collations().
"SELECT pg_import_system_collations(0)" caused an assertion failure.With a random nonzero argument --- or indeed with zero, in non-assertbuilds --- it would happily make pg_collation entries with garbagevalues of collnamespace. These are harmless as far as I can tell(unless maybe the OID happens to become used for a schema, later on?).In any case this isn't a security issue, since the function issuperuser-only. But it seems like a gotcha for unwary DBAs, so let'sadd a check that the given OID belongs to some schema.Back-patch to v10 where this function was introduced.1 parent6c20bdb commit5c06abb
1 file changed
+5
-3
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
410 |
| - | |
411 |
| - | |
412 |
| - | |
413 | 410 |
| |
414 | 411 |
| |
415 | 412 |
| |
416 | 413 |
| |
417 | 414 |
| |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
418 | 420 |
| |
419 | 421 |
| |
420 | 422 |
| |
|
0 commit comments
Comments
(0)