If you use core:onUninitialize and try to access some class which utilizes Phpr_SecurityFramework there's the potential for a race condition because destructors aren't called in any specific order. In this case, __destruct of the Phpr_SecurityFramework class is being called before my core:onUnitialize method. When Phpr_SecurityFramework::create() is called, it returns the reference to the instance, but Phpr_SecurityFramework->mode_descriptor no longer points to a valid mcrypt resource, resulting in a bunch of warnings being fired and data not being decrypted properly.
I believe the proper way to solve this would be to set self::$instance = null at the end of the destructor so if the class is needed again it will return a fresh class.
| Severity | 0 - None Assigned | Status | Fixed (and published) |
| Version | - | Fixed in | - |
Page 1 of 1
Report ID #176: Issue with Phpr_SecurityFramework and core:onUninitialize
Page 1 of 1
Replies (1 - 2)
Page 1 of 1

Help


Report