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

Topic Pattern *_ matches everything #840

Closed
Joe-0237 opened this issue Aug 18, 2023 · 4 comments
Closed

Topic Pattern *_ matches everything #840

Joe-0237 opened this issue Aug 18, 2023 · 4 comments
Labels
🪲 bug Something isn't working

Comments

@Joe-0237
Copy link

🐞 Describe the bug
Any ACL Topic Pattern containing only underscores and stars _ * matches all topics: eg.
_*, *_, _*_*_, __*__, _*_

💻 Components impacted
Server

🔮 Additional context
To reproduce:
with the default permission set to read-write
as an anonymous user
deny access to everyone for *_ ntfy access everyone *_ deny
attempt to subscribe to test

@Joe-0237 Joe-0237 added the 🪲 bug Something isn't working label Aug 18, 2023
@binwiederhier
Copy link
Owner

I see. Good catch!

@binwiederhier
Copy link
Owner

Hopefully fixed in #843

@Joe-0237
Copy link
Author

Joe-0237 commented Aug 19, 2023

E_* matches any E*
So I guess more generally sections of a patterns containing only _ and * are equivalent to *

I looked at the commit, I'm impressed with the testing, and scared of SQL xD but it does look like you got it, I'm glad we could help each other.

@binwiederhier
Copy link
Owner

As you saw it uses SQLite's wildcards, so there is not but I can do.

I looked at the commit, I'm impressed with the testing, and scared of SQL

Yeah, ... I was not happy with this complexity-add. I am not loving the wildcard-conversion thingy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants