Skip to content

Issues based on koolba's comments #1

@seveibar

Description

@seveibar

from koolba via hacker news

  • You can promisify randomBytes once and reuse it rather than twice for every invocation
  • There shouldn’t be a default value for the company name or people will end up using it.
  • The company name isn’t validated so it could contain underscores which would cause issues with the short token parsing as it assumes it’s the second “chunk”
  • The equals comparison of the hashes for the secrets is not timing safe. It’s not as bad as if they were plain text but it does short circuit due to how string equals works. Use the actual built in timing safe equals on the Buffer hash (not the stringified hex).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions