php-redis-migrate-sessions icon indicating copy to clipboard operation
php-redis-migrate-sessions copied to clipboard

fix bad length counter, fix handling null bytes, refactor

Open amfleurke opened this issue 7 years ago • 0 comments

There were two problems for me that I fixed in this version:

  • counting the length of the session string was done before escaping, so it did not count all bytes.
  • null bytes were not properly inserted.
  • skip non-session files (in case you have your session files mixed with other files in a dir

I also refactored a bit:

  • use function instead of recursive call. Is better readable
  • echo what the script does, don't echo 'find: no access to file xxx' if you have (other) files with wrong permission in the session files dir

amfleurke avatar Nov 07 '18 22:11 amfleurke