digitalutsc / arks-service

This standalone application provides a user interface to mint, (bulk) bind ARK Identifiers, and resolver for Ark URLs.
BSD 2-Clause "Simplified" License
8 stars 3 forks source link

BUG: Infinite loop when requesting negative number of ARKs #40

Closed bondjimbond closed 3 weeks ago

bondjimbond commented 4 months ago

Testing out how POST requests work, user input a negative number (-1) into the "How many ARKs would you like to mint?" field (https://github.com/digitalutsc/arks-service/blob/main/admin/admin.php#L1051).

This results in an infinite loop here: https://github.com/digitalutsc/arks-service/blob/main/admin/admin.php#L1065-L1067

Result is that the server creates new ARKs infinitely, with 34,000 minted by the time the error was reported to me.

It's a weird choice to input a negative number (user wanted to see what would happen), but would be good to prevent that kind of input from getting through.