Repository navigation
Conversation
…terIso The url parameter of registerTemplate and registerIso and VMTemplateVO allow 2048 characters, but the column was widened only to 1024 in 4.19.1, so a URL of 1025 to 2048 characters (for example an S3 presigned URL signed with temporary credentials) passed validation and failed on insert. Fixes apache#14715
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #14715
registerTemplateandregisterIsodeclareurlwithlength = 2048, andVMTemplateVOmaps the column withlength = 2048, butvm_template.urlitself isVARCHAR(1024): #8675 widened it from 255 to 1024 inschema-41900to41910.sql, and nothing changed it since. A URL of 1025 to 2048 characters therefore passes the API's length check and then fails when the template row is written. S3 presigned URLs signed with temporary credentials are usually in that range because of theX-Amz-Security-Token.This widens the column to 2048 in
schema-42210to42220.sql, with the same statement shape and column comment as the 4.19.1 change, so the column matches the API parameter and the VO, and the sibling URL columns that were widened to 2048 before (for exampletemplate_store_ref.download_urlinschema-42200to42210.sql).Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
On MySQL 8.0.46 (default
sql_mode, includingSTRICT_TRANS_TABLES), withvm_template.urlas it is after 4.19.1 and a 1701-character presigned-style URL:The statement was applied twice to check that rerunning it is harmless, and a view selecting
urlkept working.To check the change can't hit MySQL's row size limit during upgrade, I also applied it to the full
vm_templatedefinition: thecreate-schema.sqltable inutf8plus every column added to it by later upgrade scripts (40 columns). TheALTERsucceeded.I haven't run a full management server upgrade with it.