Skip to content

Custom namespace fixes again... #1118

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

Merged

Conversation

jacklul
Copy link
Collaborator

@jacklul jacklul commented Jun 23, 2020

getCommandObject() will now return a valid object when using custom namespace (instead of NULL because $filepath is not provided)

Not sure if this is secure as it skips check for admin commands access this way.

Previously: #1115

@jacklul jacklul requested a review from noplanman June 23, 2020 20:36
@jacklul jacklul force-pushed the custom_namespace_fixes_2 branch from 432dac4 to 5a84c07 Compare June 23, 2020 20:36
@noplanman
Copy link
Member

I think it should be ok, as that list is generated taking the admin status into account. (Admin check just before loading the commands objects)

So if the user isn't an admin, the command won't be in that list anyway.

@noplanman noplanman merged commit 8a3be9e into php-telegram-bot:develop Jun 24, 2020
@jacklul jacklul deleted the custom_namespace_fixes_2 branch July 27, 2020 11:42
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.

2 participants