Commit c89d350
committed
disallow accidental updates to existing links
Prior to #177, our XSRF tokens were bound to link IDs, with a special
`.new` value used for newly created links. So if a user tried to create
a link that already existed, the XSRF check would fail. After #177, this
now silently allows the user to overwrite the existing link without any
indication that this happened.
This change adds a hidden `update` param to the details edit form that
must be present when updating an existing link.
Updates #177
Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>1 parent 69257dd commit c89d350
4 files changed
+34
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
884 | 891 | | |
885 | 892 | | |
886 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
255 | 269 | | |
256 | 270 | | |
257 | 271 | | |
| |||
263 | 277 | | |
264 | 278 | | |
265 | 279 | | |
| 280 | + | |
266 | 281 | | |
267 | 282 | | |
268 | 283 | | |
269 | 284 | | |
270 | 285 | | |
271 | 286 | | |
272 | 287 | | |
| 288 | + | |
273 | 289 | | |
274 | 290 | | |
275 | 291 | | |
| |||
304 | 320 | | |
305 | 321 | | |
306 | 322 | | |
307 | | - | |
| 323 | + | |
308 | 324 | | |
309 | 325 | | |
310 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
311 | 332 | | |
312 | 333 | | |
313 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
0 commit comments