Submitted by laksmana, also found by p4y4b13
https://github.com/code-423n4/2025-01-initia-move/blob/a96f5136c4808f6968564a4592fe2d6ac243a233/usernames-module/sources/name_service.move#L483
In the extend_expiration function, the validation for the duration is incorrect, allowing the user to bypass MAX_EXPIRATION:
The issue arises because the code subtracts new_expiration_date - expiration_date for validation. 
Assume a user registers a domain and the expiration_date is equal to MAX_EXPIRATION + timestamp. Then, the user performs extend_expiration with a duration value equal to the MAX_EXPIRATION, the new_expiration_date becomes expiration_date + duration. 
This leads to the following verification check passing:
Since the new_expiration_date is calculated using expiration_date + duration, the subtraction (new_expiration_date - expiration_date) will always be less than to MAX_EXPIRATION.
As a result, the update_expiration_date function updates the expiration duration to a value far greater than MAX_EXPIRATION, effectively doubling it to MAX_EXPIRATION * 2.
Add the code below into name_service.move and run the test:
Update the validation logic to ensure the new_expiration_date itself does not exceed MAX_EXPIRATION. The code would look like this:
andrew (Initia) confirmed and commented:
