forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8275325
committed
Restrict password hash length.
Commit6aa4406 removed pg_authid's TOAST table because the onlyvarlena column is rolpassword, which cannot be de-TOASTed duringauthentication because we haven't selected a database yet andcannot read pg_class. Since that change, attempts to set passwordhashes that require out-of-line storage will fail with a "row istoo big" error. This error message might be confusing to users.This commit places a limit on the length of password hashes so thatattempts to set long password hashes will fail with a moreuser-friendly error. The chosen limit of 512 bytes should besufficient to avoid "row is too big" errors independent of BLCKSZ,but it should also be lenient enough for all reasonable use-cases(or at least all the use-cases we could imagine).Reviewed-by: Tom Lane, Jonathan Katz, Michael Paquier, Jacob ChampionDiscussion:https://postgr.es/m/89e8649c-eb74-db25-7945-6d6b23992394%40gmail.com1 parent022564f commit8275325
File tree
4 files changed
+63
-18
lines changed- src
- backend/libpq
- include/libpq
- test/regress
- expected
- sql
4 files changed
+63
-18
lines changedLines changed: 42 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
| 119 | + | |
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
128 |
| - | |
| 128 | + | |
129 | 129 |
| |
130 |
| - | |
131 |
| - | |
| 130 | + | |
132 | 131 |
| |
133 |
| - | |
134 |
| - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
135 | 136 |
| |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
140 | 141 |
| |
141 |
| - | |
142 |
| - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 |
| |
144 |
| - | |
145 |
| - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 |
| |
147 | 151 |
| |
| 152 | + | |
| 153 | + | |
148 | 154 |
| |
149 |
| - | |
150 |
| - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 |
| |
152 |
| - | |
153 |
| - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
154 | 178 |
| |
155 | 179 |
| |
156 | 180 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 |
| |
19 | 29 |
| |
20 | 30 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 |
| |
131 | 138 |
| |
132 | 139 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 |
| |
99 | 103 |
| |
100 | 104 |
| |
|
0 commit comments
Comments
(0)