Closed cottton closed 1 year ago
Note: for w/e reason cphalcon does return NULL
on ::getReservedAttributes
.
It looks like all attributes WOULD be filtered in there.
No idea atm why this return NULL ...
Try to use phalcon/incubator-mongodb@v2.0.0
Related: https://github.com/phalcon/incubator/issues/908
Test script:
This is a HUGE problem if you use
toArray
f.e. in a log or so. The DI contains everything. It may contains sensible data. So IMO this is a security leak.cphalcon filters reserved keys on
toArray
: https://github.com/phalcon/cphalcon/blob/master/phalcon/Mvc/Collection.zep#L1107incubator should do that too!
Example what could go wrong: user wants to log something - something went wrong with a model ...
In the example the DI is array, which is posted elsewhere as bug. If you set the DI on the model then var_export would try to break it down, PHP brings warning
var_export does not handle circular references
but (depends on errorhandler) it may not stop the execution.Of curse a user should choose the data to use in public. But ... well, we should not get anything else than
data
ontoArray
.