Permalink
5 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
don't allow callable strings for $func (MongoLite)
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33e7199There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aheinze Why did you disable callable strings? Now filtering with
'$fn => 'callable'throws an exception and filtering with'$fn' => function($field) {return true;}throws the following error:This breaks at least my custom full text search for repeaters in CpMultiplane and it breaks the PublicationPeriod Addon from @pauloamgomes.
33e7199There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raffaelj callable strings enabled a serious security hole. You could call all available php functions like
systemetc. I will look into the closure error!33e7199There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raffaelj I removed all $fn, $func etc filters in the latest commit. Please use
$whereinstead. Example:33e7199There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. That's a problem.
I'll give it a try tomorrow.
33e7199There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the
$wherefilter works for me. Thanks for the implementation.@aheinze What do you think about a white list for user registered function names? Than the where filter could also be used with callable strings via rest api.