- Issue created by @lauriii
- Status changed to Closed: duplicate
about 1 year ago 10:25am 31 August 2023 - ๐ซ๐ฎFinland lauriii Finland
This might be a duplicate to ๐ Make Add content/media default publishing option descriptions consistent RTBC .
- Status changed to Needs review
about 1 year ago 11:15am 31 August 2023 - last update
about 1 year ago 30,096 pass, 12 fail The last submitted patch, 3: 3384520-3.patch, failed testing. View results โ
- ๐ฎ๐ณIndia omkar.podey
omkar.podey โ made their first commit to this issueโs fork.
- last update
about 1 year ago 30,120 pass, 8 fail - @omkarpodey opened merge request.
- last update
about 1 year ago 30,121 pass, 10 fail - last update
about 1 year ago 30,035 pass, 50 fail - last update
about 1 year ago Build Successful - last update
about 1 year ago 30,143 pass, 4 fail - last update
about 1 year ago 30,147 pass, 3 fail - last update
about 1 year ago 30,123 pass, 8 fail - last update
about 1 year ago 30,150 pass, 3 fail - Status changed to Needs work
about 1 year ago 9:59am 25 September 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
This JSON:API test coverage was written without my involvement, see #2943899: Moderation state field cannot be updated via REST, because special handling in ModerationStateFieldItemList โ .
The failing assertion:
// Information disclosure prevented: when a malicious user correctly // guesses the current invalid value of a field, ensure a 200 is not sent // because this would disclose to the attacker what the current value is. // @see rest_test_entity_field_access() $response = $this->request('PATCH', $url, $request_options); $this->assertResourceErrorResponse(422, "Unprocessable Entity: validation failed.\nrest_test_validation: REST test validation failed\n", $response);
That is now a 403 response instead of a 422.
3 observations:
- Did you already step through the code starting in
NodeAccessControlHandler
, where access to modifyingvid
is being denied, to follow the trace to how this gets mapped to a 422 response? If you did, I canโt find it in this issue. - That test coverage was added in #2821077: PATCHing entities validates the entire entity, also unmodified fields, so unmodified fields can throw validation errors โ . Did you read that issue, to try to understand why your change is causing the 403, and whether that is indeed also a sec vulnerability?
- Possibly something is causing a new revision to be created automatically, which then results in
vid
being validated, and that causes the 403?
- Did you already step through the code starting in
- last update
about 1 year ago 30,346 pass, 3 fail - last update
about 1 year ago 30,226 pass, 26 fail - last update
about 1 year ago 30,334 pass, 3 fail - last update
about 1 year ago 30,364 pass - last update
about 1 year ago 30,366 pass - last update
about 1 year ago 30,362 pass - Status changed to Needs review
about 1 year ago 7:14am 29 September 2023 - Status changed to RTBC
about 1 year ago 2:50pm 29 September 2023 - Status changed to Needs work
about 1 year ago 10:11pm 29 September 2023 - ๐จ๐ญSwitzerland berdir Switzerland
Added a few comments.
Also, that the media type settings basically has the same info as node type, with the administer media permission, but media isn't fixed yet here.
One last thing, to make this issue even more fun. I'm not even 100% sure that fixing access to do what the permission says is even the right thing to do at this point. It's likely been like this for a very long time, and sites probably rely on it, because while they might to allow users to decide if a new revision should be created or not, but not things like changing the author or sticky/promoted flags and whatever else these administer permissions allow.
which I now realize is exactly what ๐ Make Add content/media default publishing option descriptions consistent RTBC is about, it's updating the description to match how it actually works, which is IMHO fine. There's still things to fix and improve here, like the invalid field access operations, but we wouldn't actually change NodeAccessControlHandler here.
- last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 30,329 pass, 27 fail - last update
about 1 year ago 30,372 pass - last update
about 1 year ago 30,372 pass - Status changed to Needs review
about 1 year ago 10:15am 19 October 2023 - ๐จ๐ญSwitzerland berdir Switzerland
Added some new comments.
To be clear, as I said in #12, I'm not convinced that this is the right thing to do. I think the referenced issue that just fixes the docs is the better direction. If someone wants to alter access they can do so, but this is going to be a behavior change for many sites that currently rely on this being visible.
I would suggest that we extract the few unrelatd bits that make sense, like the JS fix, and then instead get the other issue in and close this as won't fix?
- Status changed to Needs work
about 1 year ago 6:19pm 21 November 2023 - ๐บ๐ธUnited States smustgrave
To keep this from stalling, unless anyone has a counter argument for #14 going to move to NW for #14