session icon indicating copy to clipboard operation
session copied to clipboard

Use double underscore prefix for internal session keys

Open kroleg opened this issue 7 years ago • 6 comments

Closes #29

kroleg avatar Dec 16 '18 14:12 kroleg

Coverage Status

Coverage remained the same at 100.0% when pulling 3f7d5a4ad87a025a0326642aba6230aa4864452e on kroleg:feature/double_underscore_prefix_for_internal_keys into 89c048adc5a64b6c12c87047b766ac34be10af77 on koajs:master.

coveralls avatar Dec 16 '18 14:12 coveralls

Coverage Status

Coverage remained the same at 100.0% when pulling 3f7d5a4ad87a025a0326642aba6230aa4864452e on kroleg:feature/double_underscore_prefix_for_internal_keys into 89c048adc5a64b6c12c87047b766ac34be10af77 on koajs:master.

coveralls avatar Dec 16 '18 14:12 coveralls

It think that this change should not break anything. There was no possibility to use keys prefixed with double underscore before and after this change. There is a possibilty to use keys prefixed with one underscore after this change.

kroleg avatar Dec 16 '18 14:12 kroleg

It is actually a breaking change. Because before this change cookie had _session, _expire and _maxAge extra keys which after this change will have double underscore prefix instead of one. And it can break code of people who relyed on this fields. I don't know why anyone will do such a thing, but still there is a possibilty, so this change should be considered as braking

kroleg avatar Dec 16 '18 16:12 kroleg

yes, I'll holding this change until we have the plan to get another major version. for now maybe we should document the underscore rule in README first.

dead-horse avatar Dec 18 '18 03:12 dead-horse

@dead-horse Are there any updates for this? I well... was bitten by this and is looking forward for this 👍

goranmoomin avatar Dec 26 '19 00:12 goranmoomin