Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same messages for not found and access denied #1812

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

sebix
Copy link
Contributor

@sebix sebix commented Nov 26, 2024

To prevent information leaks, show a more generic message to users if they have no permissions to a resource does not exist and they have no access to

fixes #1728

@UlrichB22
Copy link
Collaborator

Thanks for the PR.

There is still a lint check open:

+++ /home/runner/work/moin/moin/src/moin/apps/frontend/views.py	2024-11-26 11:15:50.716249+00:00
@@ -1099,11 +1099,11 @@
                 # user probably checked a subitem and checked do subitems
                 response["messages"].append(
                     _("Item '{bad_name}' does not exist or you do not have permission to access it.").format(
                         bad_name=item.name
                     )
-                    )
+                )
                 continue
             subitem_names = []
             if req == "destroy":
                 if do_subitems:
                     subitems = item.get_subitem_revs()
would reformat /home/runner/work/moin/moin/src/moin/apps/frontend/views.py

And one translation has been lost:

#: src/moin/converters/macro.py:60

To prevent information leaks, show a more generic message to users if
they have no permissions to a resource does not exist and they have no
access to

fixes moinwiki#1728
@sebix
Copy link
Contributor Author

sebix commented Nov 27, 2024

There is still a lint check open:

The formatting was done by the pre-commit tools. I fixed it manually now.

And one translation has been lost:

Isn't this file generated by the extract command? I re-added the line manually

@UlrichB22
Copy link
Collaborator

@sebix: please push your last change to your fix-1728 branch. The check status of this branch is still red.

@UlrichB22 UlrichB22 merged commit 7ea02f3 into moinwiki:master Nov 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Information leak: Anonymous users can guess page names of restricted wikis
2 participants