Repository navigation
Commit d49cecb
committed
Privacy: Avoid PHP warnings for invalid request IDs.
When the checks in `wp_validate_user_request_key()` were consolidated in r49090, the `confirm_key` and `modified_timestamp` properties came to be read before the request was confirmed to exist. A confirmation link whose `request_id` is not a `user_request` post, as is common with bot probes of `wp-login.php?action=confirmaction`, therefore logged two "Attempt to read property on false" warnings before returning the `invalid_request` error. The error is now returned as soon as the lookup fails, so the returned errors are unchanged.
Developed in #14991.
Follow-up to r49090.
Props bor0.
See #51351.
Fixes #66389.
git-svn-id: https://develop.svn.wordpress.org/trunk@64997 602fd350-edb4-49c9-b593-d223f7449a821 parent 1021d4d commit d49cecb
2 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5126 | 5126 | | |
5127 | 5127 | | |
5128 | 5128 | | |
5129 | | - | |
5130 | | - | |
| 5129 | + | |
| 5130 | + | |
| 5131 | + | |
| 5132 | + | |
| 5133 | + | |
| 5134 | + | |
| 5135 | + | |
5131 | 5136 | | |
5132 | 5137 | | |
5133 | 5138 | | |
5134 | | - | |
| 5139 | + | |
5135 | 5140 | | |
5136 | 5141 | | |
5137 | 5142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
975 | 992 | | |
976 | 993 | | |
977 | 994 | | |
| |||
0 commit comments