Upgrading from Lucee 5 to 6: breaking change with argon hashing

If you rely on Lucee’s built-in argon hashing functions, be aware of the following issues when upgrading from Lucee 5 to 6.

  1. In Lucee 6 you need to install the Argon extension…

  2. …but not the latest (at the time of writing) version 1.0.0.7 which doesn’t work. Instead go for the previous version 1.0.0.6 (or perhaps a later version if it’s since been fixed by the time you read this).

  3. Your code will probably need to change as there is a breaking change to the Argon2CheckHash() function. As part of the Lucee 5 core, this BIF took 3 arguments: input, hash and variant. With the extension it now only takes 2: input, hash (the variant is now auto-detected from the hash, as it should have been all along). Continuing to specify a variant will cause an exception: Too many arguments (2:3) in function call [Argon2CheckHash];

One further point, if you use Argon2CheckHash() within an ORM entity and don’t change your code as in (3) above, you may not be able to load the entity at all. As anyone experienced with ORM knows, syntax errors in entities will often lead to the entity not being available to the framework and you will get an error such as: entity [User] does not exist, existing entities are [Customer, Product, etc]

2 Likes