This repository was archived by the owner on Jun 2, 2021. It is now read-only.
Commit 9997811
🐞 v3: Don't 500 UAA Client GUIDS with exotic chars
- Creating a user who happens a UAA client allows setting the GUID
- The GUID can be set to an arbitrary set of characters, e.g.
`+(select*from(select(sleep(20)))a)+`
- [note: the previous SQL injection attempt did not work, and does
not work]
- The character is properly created, but can no longer be retrieved
via `GET /v3/users/:guid`; CAPI returns a 500
- We now `CGI.escape()` the GUID to prevent `URI::HTTP.build` from
throwing an error when we format its link URL (in `ApiUrlBuilder`)
[finishes #172744797]
Co-authored-by: Brian Cunnie <bcunnie@pivotal.io>
Co-authored-by: Reid Mitchell <rmitchell@pivotal.io>1 parent cad908a commit 9997811
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
458 | 473 | | |
459 | 474 | | |
460 | 475 | | |
| |||
0 commit comments