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

[Feature Request] Product Key Field 252 character limitation - consider raising limitation to 1024 characters #2535

Closed
2 tasks done
delize opened this issue Aug 31, 2016 · 7 comments

Comments

@delize
Copy link

delize commented Aug 31, 2016

Expected Behavior (or desired behavior if a feature request)

I expect it to allow a serial number (regardless of character limits) to be entered into the Product Key Field on the License Asset Page


Actual Behavior

Character count appears to be limited to 252 characters. Causing longer product keys (like those from 3T.io) to discard the remaining product keys in the Web UI.

3T.io/MongoChef's license is ~512 characters. I also expect that there are other license files that could be potentially longer. Please consider raising the character limitation to 1024. I expect that it is limited to 256.


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running
    v3.3.0-3-g7ef4f23
  • What OS and web server you're running Snipe-IT on
    Ubuntu 16.04
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
    install.sh
  • If you're getting an error in your browser, include that error
    N/A
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
    domain.org/admin/licenses/1/edit
  • If a stacktrace is provided in the error, include that too.
    N/A
  • Any errors that appear in your browser's error console.
    N/A
  • Confirm whether the error is reproduceable on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
    Created a database of users, imported physical assets and two product license keys.
  • Indicate whether or not you've manually edited any data directly in the database
    No
@delize
Copy link
Author

delize commented Aug 31, 2016

Just to also add, the Notes function does not have this limitation, which allows me to post the full Product Key. This works as a temporary work around, but it would be helpful in any case to increase the character limitation.

@erik-burgess
Copy link

Would like to second this. I changed the DB field type to mediumtext as a workaround, but that's probably not a good longterm solution.

@delize delize changed the title Product Key Field 252 character limitation - consider raising limitation to 1024 characters [Feature Request] Product Key Field 252 character limitation - consider raising limitation to 1024 characters Sep 2, 2016
@delize
Copy link
Author

delize commented Oct 16, 2016

I would actually like to make the request to extend it to 2046 characters if possible. That should prevent any future issues with any form of serial or key.

@delize
Copy link
Author

delize commented Oct 28, 2016

I may be mistaken but it looks like line 324 of snipe-it/database/2016_02_13_071006_create_snipeit_laravel_database.php

It would need to be changed to:
$table->string('serial', 2048)->nullable();

I think?

(I have a limited knowledge of Laravel)

delize added a commit to delize/snipe-it that referenced this issue Oct 28, 2016
Updates the product key field from ~255< to a varchar entry in the database with 2048 character entry.

This should appropriately fix the limited entry for serial numbers.

Might want to double check my laravel. Still trying to glass over the code, but, if I understood it right, this is the location of where it needs to be changed?
@snipe
Copy link
Owner

snipe commented Oct 28, 2016

No, that file can actually be removed. It was a backup for when we switched fro v2 to v3. All of the database migrations are in the database/migrations folder, and a new migration would need to be created for this.

@snipe snipe closed this as completed in 066d947 Oct 28, 2016
@delize
Copy link
Author

delize commented Oct 28, 2016

Oh damn, yeah, that was much more complicated then just a single page. :)

Thanks for creating the change @snipe 👍! This application rocks!

@snipe
Copy link
Owner

snipe commented Oct 28, 2016

kid

dmeltzer pushed a commit to dmeltzer/snipe-it that referenced this issue Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants