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

fix: long version of go dependency unable to inserted into software table (CVE-2020-36569) #5221

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/src/main/resources/data/upgrade_5.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE software ALTER COLUMN versionEndExcluding SET DATA TYPE VARCHAR(75);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest a higher number than 75, because it is the exact the size for this specific entry.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 255 like other COLUMNs or even more. Is their a concret reason for 75 except that the current CVE needs 75?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am all for 255, at least I don't see a reason to not make it reasonably bigger, otherwise 75 is just us waiting for the next one to happen.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as @Keymaster65 already suggested, i would also prefer to take the column length of 255 chars:

Suggested change
ALTER TABLE software ALTER COLUMN versionEndExcluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionEndExcluding SET DATA TYPE VARCHAR(255);
ALTER TABLE software ALTER COLUMN versionEndIncluding SET DATA TYPE VARCHAR(255);
ALTER TABLE software ALTER COLUMN versionStartExcluding SET DATA TYPE VARCHAR(255);
ALTER TABLE software ALTER COLUMN versionStartIncluding SET DATA TYPE VARCHAR(255);

Copy link

@pijean-rca pijean-rca Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not this file be named upgrade_5.2.1.sql ?

ALTER TABLE software ALTER COLUMN versionEndIncluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionStartExcluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionStartIncluding SET DATA TYPE VARCHAR(75);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ALTER TABLE software ALTER COLUMN versionEndExcluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionEndIncluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionStartExcluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionStartIncluding SET DATA TYPE VARCHAR(75);
ALTER TABLE software ALTER COLUMN versionEndExcluding SET DATA TYPE VARCHAR(100);
ALTER TABLE software ALTER COLUMN versionEndIncluding SET DATA TYPE VARCHAR(100);
ALTER TABLE software ALTER COLUMN versionStartExcluding SET DATA TYPE VARCHAR(100);
ALTER TABLE software ALTER COLUMN versionStartIncluding SET DATA TYPE VARCHAR(100);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say 255 is even more on the safe side, as @nusmanov suggested:

jeremylong marked this conversation as resolved.
Show resolved Hide resolved

UPDATE Properties SET `value`='5.3' WHERE ID='version';