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

Creating an issue with title ending in '?' fails #8301

Closed
guillep2k opened this issue Sep 27, 2019 · 5 comments
Closed

Creating an issue with title ending in '?' fails #8301

guillep2k opened this issue Sep 27, 2019 · 5 comments
Labels
Milestone

Comments

@guillep2k
Copy link
Member

  • Gitea version (or commit ref): c6fb7fe

Description

Creating an issue with title ending with ? fails with:

"could not determine data type of parameter $1"

However, the error is masked and the message actually logged (and displayed in the 500 Server Error page) is different due to a problem introduced in #7898 (I'll file an issue for that as well).

@lunny I think this is a problem in xorm, but I can't pinpoint the cause to file an Issue over there.

I could trace the error into:

github.com/lib/pq.(*conn).QueryContext (\home\gprandi\src\pkg\mod\github.com\lib\pq@v1.2.0\conn_go18.go:20)
database/sql.ctxDriverQuery (\home\gprandi\go\src\database\sql\ctxutil.go:48)
database/sql.(*DB).queryDC.func1 (\home\gprandi\go\src\database\sql\sql.go:1592)
database/sql.withLock (\home\gprandi\go\src\database\sql\sql.go:3184)
database/sql.(*DB).queryDC (\home\gprandi\go\src\database\sql\sql.go:1587)
database/sql.(*Tx).QueryContext (\home\gprandi\go\src\database\sql\sql.go:2291)
xorm.io/core.(*Tx).QueryContext (\home\gprandi\src\pkg\mod\xorm.io\core@v0.7.0\tx.go:87)
github.com/go-xorm/xorm.(*Session).queryRows (\home\gprandi\src\pkg\mod\github.com\go-xorm\xorm@v0.7.8-0.20190925172902-71947cf034b6\session_raw.go:79)
github.com/go-xorm/xorm.(*Session).queryBytes (\home\gprandi\src\pkg\mod\github.com\go-xorm\xorm@v0.7.8-0.20190925172902-71947cf034b6\session_raw.go:143)
github.com/go-xorm/xorm.(*Session).innerInsert (\home\gprandi\src\pkg\mod\github.com\go-xorm\xorm@v0.7.8-0.20190925172902-71947cf034b6\session_insert.go:509)
github.com/go-xorm/xorm.(*Session).Insert (\home\gprandi\src\pkg\mod\github.com\go-xorm\xorm@v0.7.8-0.20190925172902-71947cf034b6\session_insert.go:88)
code.gitea.io/gitea/models.newIssue (\home\gprandi\src\code.gitea.io\gitea\models\issue.go:1113)
code.gitea.io/gitea/models.NewIssue (\home\gprandi\src\code.gitea.io\gitea\models\issue.go:1210)
code.gitea.io/gitea/routers/repo.NewIssuePost (\home\gprandi\src\code.gitea.io\gitea\routers\repo\issue.go:574)
[... etc.]
@guillep2k
Copy link
Member Author

#8302 explains why the error above is not logged properly.

@guillep2k
Copy link
Member Author

It doesn't have to be the title, and most of the time it doesn't have to be at the end of the text. A ? ending the issue content or comment makes it fail too. However, a ? in any position of the title makes it fail.

Example title failing: test?

@lunny for the moment I'd simply roll back the whole #7898 , since this is a problem in INSERT WHERE.

@lunny
Copy link
Member

lunny commented Sep 28, 2019

I have sent go-xorm/xorm#1440 to fix the question mark problem. But I think it may have another problems. So I think to revert #7898 is a better choice currently.

@guillep2k
Copy link
Member Author

This should be targeted for 1.10.0

@lunny
Copy link
Member

lunny commented Sep 29, 2019

closed by #8309

@lunny lunny closed this as completed Sep 29, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants