- 🇩🇪Germany Anybody Porta Westfalica
Stll relevant in 2.x
Nice work @jurgenhaas! :)
- last update
almost 2 years ago Patch Failed to Apply - 🇩🇪Germany Anybody Porta Westfalica
@jurgenhaas would you mind providing this as MR for easier review? So we can push things forward here.
Any security considerations? I'm thinking about information disclosure, if files are public but typically not found (security by obscurity isn't security, but sites might still be affected without knowing...) - 🇩🇪Germany jurgenhaas Gottmadingen
would you mind providing this as MR for easier review?
Happy to do that, but let's decide on this first:
Any security considerations? I'm thinking about information disclosure, if files are public but typically not found
Good question, I'm not sure. As for the intended use case to help users getting to "bookmarked" file links, it isn't in any way disclosing anything that the user didn't already have, i.e. the name of the file.
However, with this feature, anonymous users could utilize the search feature to deliberately search for arbitrary file names, and they would then get to those files, if they were registered as file entities. That's something they would get otherwise. On the other hand, as you already mentioned, the file is publicly available and therefore supposed to be used/found.
- 🇩🇪Germany Anybody Porta Westfalica
@jurgenhaas thanks! :)
Yes I agree, so having this as an option, disabled by default, should be a good choice. Should we add a sentence to the description to describe this minor risk?
I'm also fine with the current implementation, as the user has to opt-in, so this is just about details. - Merge request !25Issue #2917333 by jurgenhaas, Anybody: Redirect to file if available → (Merged) created by jurgenhaas
- 🇩🇪Germany jurgenhaas Gottmadingen
Created an issue fork and opened an MR, please have a look.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @jurgenhaas LGTM!
I didn't test it myself yet, but code seems fine. Let's wait for community or other maintainer testing it manually before setting it RTBC.
- Status changed to Needs work
over 1 year ago 10:33am 6 February 2024 - 🇮🇳India mitthukumawat
I have pull the MR in a drupal setup. These are the findings :
- The option Search for file entities exists.
- After enabling it, the search 404 not working. It showing this error :
Error: Call to a member function getStorage() on null in Drupal\search404\Controller\Search404Controller->findFileEntity() (line 605 of /app/modules/contrib/search404/src/Controller/Search404Controller.php)
.
- Status changed to Needs review
over 1 year ago 11:02am 6 February 2024 - 🇩🇪Germany jurgenhaas Gottmadingen
Thanks @mitthukumawat for finding and reporting this issue. This happened after we switched to dependency injection for services and instead of calling
$this->entityTypeManager
we need to call the function$this->entityTypeManager()
to get to that service.I've updated the MR, please give it another try.
- Status changed to RTBC
over 1 year ago 1:48pm 6 February 2024 - 🇮🇳India mitthukumawat
Thanks @jurgenhaas, I have reviewed again and it is working fine.
- First commit to issue fork.
-
jijojoseph_zyxware →
committed 6cd70437 on 2.x authored by
jurgenhaas →
Issue #2917333 by jurgenhaas, Anybody: Redirect to file if available
-
jijojoseph_zyxware →
committed 6cd70437 on 2.x authored by
jurgenhaas →
- Status changed to Fixed
over 1 year ago 10:25am 13 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.