- Notifications
You must be signed in to change notification settings - Fork28
Commit23aad18
committed
Make contrib/unaccent's unaccent() function work when not in search path.
Since the fixes forCVE-2018-1058, we've advised people to schema-qualifyfunction references in order to fix failures in code that executes undera minimal search_path setting. However, that's insufficient to make thesingle-argument form of unaccent() work, because it looks up the "unaccent"text search dictionary using the search path.The most expedient answer seems to be to remove the search_path dependencyby making it look in the same schema that the unaccent() function itselfis declared in. This will definitely work for the normal usage of thisfunction with the unaccent dictionary provided by the extension.It's barely possible that there are people who were relying on thesearch-path-dependent behavior to select other dictionaries with the samename; but if there are any such people at all, they can still get thatbehavior by writing unaccent('unaccent', ...), or possiblyunaccent('unaccent'::text::regdictionary, ...) if the lookup has to bepostponed to runtime.Per complaint from Gunnlaugur Thor Briem. Back-patch to all supportedbranches.Discussion:https://postgr.es/m/CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com1 parent834bce0 commit23aad18
2 files changed
+21
-3
lines changedLines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
| 25 | + | |
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
| |||
376 | 378 |
| |
377 | 379 |
| |
378 | 380 |
| |
379 |
| - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
380 | 396 |
| |
381 | 397 |
| |
382 | 398 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
177 |
| - | |
| 177 | + | |
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
183 | 185 |
| |
184 | 186 |
| |
185 | 187 |
| |
|
0 commit comments
Comments
(0)