Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Licenses with 2147483647 seats cannot be checked out or deleted or edited #15033

Open
2 tasks done
pieterhouwen opened this issue Jul 5, 2024 · 2 comments
Open
2 tasks done

Comments

@pieterhouwen
Copy link

pieterhouwen commented Jul 5, 2024

Debug mode

Describe the bug

Probably has to do with an int overflow but when you create a license with the maximum number of seats that the int can handle the license cannot be updated, checked out or deleted.

Reproduction steps

  1. Create a license where the amount of seats is the maximum number that an int32 can hold (see title)
  2. Try to update the license or delete the license

Expected behavior

The license is updated, checked out, or deleted

Screenshots

image

Snipe-IT Version

v7.0.4 build 14011 (g20d558785)

Operating System

Ubuntu

Web Server

Apache2

PHP Version

8.1.2-1ubuntu2.17

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

[2024-07-05 11:43:26] production.ERROR: Symfony\Component\ErrorHandler\Error\FatalError: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/snipeit/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:89
Stack trace:
#0 {main}
[2024-07-05 11:43:26] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) {"userId":2,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) at /var/www/html/snipeit/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:89)
[stacktrace]

Additional context

No response

@snipe
Copy link
Owner

snipe commented Jul 8, 2024

The system is not meant to handle that number of seats and never was. What is the possible use case you have for creating 2,147,483,647 license seats?

@pieterhouwen
Copy link
Author

It is because I want to add open source licenses (GPL/MIT/etc) and figured since I cannot disable the license seats entirely I just make it as high as possible. I can maybe also get away with a license with 2,147,483,646 seats I hope ;) but I figured I would report it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants