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 DBConsistency checks on MSSQL (#23132) #23133

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

yardenshoham
Copy link
Member

Backport #23132

Unfortunately xorm's builder.Select(...).From(...) does not escape the table names. This is mostly not a problem but is a problem with the user table.

This PR simply escapes the user table. No other uses of From("user") where found in the codebase so I think this should be all that is needed.

Fix #23064

Unfortunately xorm's `builder.Select(...).From(...)` does not escape the
table names. This is mostly not a problem but is a problem with the
`user` table.

This PR simply escapes the user table. No other uses of `From("user")`
where found in the codebase so I think this should be all that is
needed.

Fix go-gitea#23064

Signed-off-by: Andrew Thornton <art27@cantab.net>
@yardenshoham yardenshoham added this to the 1.18.6 milestone Feb 24, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 25, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 25, 2023
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

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

Wouldn't it be better to fix the bug in the builder itself?
I don't see any reason why one would want an unquoted from at all, so it simply annoys users…
(But as long as that is not implemented, this fix is needed)

@yardenshoham
Copy link
Member Author

This is a backport so you might want to comment this on the original PR

@lafriks lafriks merged commit 1170e06 into go-gitea:release/v1.18 Feb 25, 2023
@yardenshoham yardenshoham deleted the backport-23132-v1.18 branch February 25, 2023 19:18
@delvh
Copy link
Member

delvh commented Feb 25, 2023

That was already merged by the time I wrote this comment, hence I simply combined my review with this comment…

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants