You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, there are a number of circumstances where Underpin generates a hash, and sometimes that has is generated from an array of arguments. These are all normalized in their own places using some basic sorting functionality when-necessary. It would be nice Underpin had some built-in functions to handle some annoying PHP things that are common, like:
Recursive sorting of arrays
Convert an array of data to be serialize-able (eg: a closure in an array will fail if serialized)
Generating quick hashes, as well as secure hashes
I don't know where, but number 2 in-particular will ineviatably cause issues, or because it's not being done right, we're probably running into potential for hash collissions.
Introducing these methods would make it a little easier to work with arrays and hashes while also ensuring that current hashes work consistently.
The hash should also always prefix hashes with the string underpin at the beginning. This will allow distributed plugins that use Underpin's package command to automatically override this prefix with whatever they rename underpin to.
Ironically enough, I also think the recursinve array sorting and data normalization should probably be stored in the object cache so it can be accessed again quicker should this function need to run multiple times with the same array.
The text was updated successfully, but these errors were encountered:
Right now, there are a number of circumstances where Underpin generates a hash, and sometimes that has is generated from an array of arguments. These are all normalized in their own places using some basic sorting functionality when-necessary. It would be nice Underpin had some built-in functions to handle some annoying PHP things that are common, like:
I don't know where, but number 2 in-particular will ineviatably cause issues, or because it's not being done right, we're probably running into potential for hash collissions.
Introducing these methods would make it a little easier to work with arrays and hashes while also ensuring that current hashes work consistently.
The hash should also always prefix hashes with the string
underpin
at the beginning. This will allow distributed plugins that use Underpin's package command to automatically override this prefix with whatever they renameunderpin
to.Ironically enough, I also think the recursinve array sorting and data normalization should probably be stored in the object cache so it can be accessed again quicker should this function need to run multiple times with the same array.
The text was updated successfully, but these errors were encountered: