- Issue created by @dpi
- @dpi opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 11:13am 1 February 2023 - π©πͺGermany hchonov πͺπΊπ©πͺπ§π¬
larowlan β credited hchonov β .
- π¦πΊAustralia dpi Perth, Australia
It was hoisted into the security queue. @larowlan reckon we could get it reinstated?
- ππΊHungary mxr576 Hungary
Our patches from the original sec issue could be re-uploaded here, but most probably an MR would be easier for everyone. Let that be 3039 or a new one.
- π¦πΊAustralia dpi Perth, Australia
The patch was originally based of 3039.
I have the code for the MR locally. I'll push the branch as a new MR if we cant get 3039 back.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
@drumm had to delete it from gitlab, we will need to open a new one, if you've got the branch locally please go ahead dpi
- Merge request !3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access β (Closed) created by dpi
- π¦πΊAustralia dpi Perth, Australia
No worries.
MR !3531 replaces !3309
- Status changed to Needs work
almost 2 years ago 3:38pm 24 February 2023 - πΊπΈUnited States smustgrave
Let me know if this was a wrong way to test.
I added a user field to a content a type.
Made sure anonymous users cannot view information about user
Open private browser and I see the link to the user. This is with the patch. - π¦πΊAustralia dpi Perth, Australia
@smustgrave that might be
\Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceLabelFormatter
, which also suffers the same problem in π Entity reference label formatter may render link to inaccessible entity Closed: duplicate .The solution/tests are similar. Maybe the issues should be merged?
- πΊπΈUnited States smustgrave
Would be nice. Will let you make that call as π Entity reference label formatter may render link to inaccessible entity Closed: duplicate still needs tests so wouldn't want to hold this fix up for that.
But if we keep separate how to best test this one?
- π¦πΊAustralia dpi Perth, Australia
In most cases
StringFormatter
link to the entity its attached to, so you'd need to deny access to view the canonical page. Could do this with a hook_entity_access, or regular permissions.- Add a
string
field to an entity (Text (Plain)) - Manage display
- Configure field to display
- Formatter should be
string
(labeled: "Plain text", class is StringFormatter ) - Configure formatter
- Click Link to the XYZ checkbox.
- Save.
- Add a
- First commit to issue fork.
- last update
over 1 year ago 29,447 pass, 4 fail - πΊπΈUnited States drumm NY, US
The fork is no longer private and should be usable as normal again.
- First commit to issue fork.
- last update
about 1 year ago 29,483 pass, 4 fail - Open on Drupal.org βEnvironment: PHP 8.2 & MySQL 8last update
about 1 year ago Not currently mergeable. - @kksandr opened merge request.
- last update
about 1 year ago Custom Commands Failed - Open on Drupal.org βEnvironment: PHP 8.2 & MySQL 8last update
about 1 year ago Not currently mergeable. - @kksandr opened merge request.
- Merge request !4858Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access β (Closed) created by Unnamed author
- last update
about 1 year ago 30,206 pass, 4 fail - last update
about 1 year ago 29,483 pass, 4 fail - π¦πΊAustralia acbramley
@kksandr you've opened multiple MRs and uploaded multiple patches, can you please close/hide the irrelevant ones and explain your work?
@acbramley Sorry, my mistake. I updated MR to be compatible with the 11.x branch. After that, I tried to apply MR as a patch on my site (Drupal 10.1), but it did not apply, so I separately rerolled the patch for 10.1.x
- π¦πΊAustralia acbramley
@kksandr which MR is the correct one?
There was an existing one https://git.drupalcode.org/project/drupal/-/merge_requests/3531
You've created 3 more:
https://git.drupalcode.org/project/drupal/-/merge_requests/4856
https://git.drupalcode.org/project/drupal/-/merge_requests/4857
https://git.drupalcode.org/project/drupal/-/merge_requests/4858This makes it very confusing to review, please close the incorrect ones.
kksandr β changed the visibility of the branch 3336994-stringformatter-access to hidden.
kksandr β changed the visibility of the branch 3336994-stringformatter-access-r5 to hidden.
- Status changed to Needs review
7 months ago 11:40am 6 June 2024 - πΊπΈUnited States smustgrave
smustgrave β changed the visibility of the branch 3336994-stringformatter-access-r2 to hidden.
- πΊπΈUnited States smustgrave
smustgrave β changed the visibility of the branch 3336994-stringformatter-access-r2 to active.
- Status changed to RTBC
6 months ago 2:34pm 12 June 2024 - πΊπΈUnited States smustgrave
Bummer can't hide 3531 without hiding 8317 so marked in the issue summary
Ran test-only feature https://git.drupalcode.org/issue/drupal-3336994/-/jobs/1841768 which choses all the coverage
Reviewing code and changes make sense.
Only concern I suppose I would have is seeing all the test updates if this would break contrib tests potentially. But doing a deprecation not sure make sense since the link renders a 403.
LGTM
- Status changed to Needs work
6 months ago 3:27pm 19 June 2024 - πΊπΈUnited States xjm
I closed the superfluous merge request. Unfortunately, the canonical one mentioned in the IS has merge conflicts. So this needs those conflicts resolved. (To receive credit for resolving merge conflicts, the conflict and how it was resolved need to be documented on the issue.) Thanks!
- Status changed to Needs review
6 months ago 7:48pm 19 June 2024 - ππΊHungary mxr576 Hungary
git rebase origin/11.x Auto-merging core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php Auto-merging core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php CONFLICT (content): Merge conflict in core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php error: could not apply d0714b0f46... Fix failing test hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm <conflicted_files>", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip". hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved conflicts caused by added void return type hints.
- Status changed to RTBC
6 months ago 8:52pm 19 June 2024 - Status changed to Needs work
6 months ago 1:59pm 7 July 2024 - π¬π§United Kingdom alexpott πͺπΊπ
We need to add a change record to cover this change. Also we should mention tests because quite a few have had to change as a result of this change.
- Status changed to Needs review
6 months ago 6:56am 8 July 2024 - ππΊHungary mxr576 Hungary
Drafted https://www.drupal.org/node/3459840 β based on Alex's suggestions.
- Status changed to RTBC
6 months ago 10:53pm 8 July 2024 - Status changed to Needs work
6 months ago 10:48am 9 July 2024 - π¬π§United Kingdom alexpott πͺπΊπ
The tests which are being changed to set up UID 0 do not need this change and should be reverted. Once that's done this can be set back to rtbc.
- Status changed to RTBC
5 months ago 6:37pm 10 July 2024 - ππΊHungary mxr576 Hungary
Fixed the single one thing that Alex asked and I dared to move this back to RTBC
- Status changed to Needs work
5 months ago 1:31am 25 July 2024 - π³πΏNew Zealand quietone
I read the IS and the comments. Thanks for the up to date issue summary. There are no unanswered questions but there are changes to core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php that alexpott said are not necessary. They are still in the MR. And then, looking at the MR I left a question about changes to another file.
I read the change record and it is easy to follow. It is good that includes what sites should do. Nice work. At first I thought the title could just say that the link is not displayed instead of 'restricts'. But maybe that is a good thing so people are curious and read the notice.
Setting to NW for the 2 comments in the MR.
- Status changed to Needs review
5 months ago 10:30am 25 July 2024 - ππΊHungary mxr576 Hungary
Thanks @quietone for your high quality review again, I have fixed your findings, even more https://git.drupalcode.org/project/drupal/-/merge_requests/8317/diffs?co....
- Status changed to Needs work
5 months ago 12:03pm 25 July 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Status changed to Needs review
5 months ago 12:52pm 25 July 2024 - Status changed to RTBC
5 months ago 6:00pm 5 August 2024 - πΊπΈUnited States smustgrave
From what I can tell additional feedback has been addressed
- ππΊHungary mxr576 Hungary
FTR, opened π StringFormatter does not support entity uri_callback Active as a follow up, fixing that is not the scope of this issue.
-
longwave β
committed 1019986c on 10.4.x
Issue #3336994 by mxr576, kksandr, dpi, smustgrave, xjm, alexpott,...
-
longwave β
committed 1019986c on 10.4.x
-
longwave β
committed 4c8c814c on 11.x
Issue #3336994 by mxr576, kksandr, dpi, smustgrave, xjm, alexpott,...
-
longwave β
committed 4c8c814c on 11.x
- π¬π§United Kingdom longwave UK
Although this is a bug fix and security hardening I am not committing to 11.0.x or 10.3.x as it is a behaviour change and we do not want to break tests or surprise users that are currently relying on this functionality.
Committed and pushed 4c8c814c10 to 11.x and 1019986cb1 to 10.4.x. Thanks!
Also published the change record.
Automatically closed - issue fixed for 2 weeks with no activity.