-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Request on '/verify' with wrong verification code doesn't return error or any status, it just fails.
Example request:
Logs from DB:
postgresql_1 | ERROR: invalid input syntax for integer: ""
postgresql_1 | CONTEXT: SQL function "verify_owner" statement 1
postgresql_1 | STATEMENT: SELECT oauth2.verify_owner('')
oauth-api_1 | 2019/08/06 14:18:09 pq: invalid input syntax for integer: ""
oauth-api_1 | 2019/08/06 14:18:09 http: panic serving 172.19.0.1:60610: runtime error: invalid memory address or nil pointer dereference
oauth-api_1 | goroutine 437 [running]:
oauth-api_1 | net/http.(*conn).serve.func1(0xc4201460a0)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1697 +0xd0
oauth-api_1 | panic(0x829480, 0xaf7470)
oauth-api_1 | /usr/local/go/src/runtime/panic.go:491 +0x283
oauth-api_1 | database/sql.(*Rows).close(0x0, 0x0, 0x0, 0x0, 0x0)
oauth-api_1 | /usr/local/go/src/database/sql/sql.go:2742 +0x75
oauth-api_1 | database/sql.(*Rows).Close(0x0, 0x0, 0x0)
oauth-api_1 | /usr/local/go/src/database/sql/sql.go:2738 +0x3d
oauth-api_1 | main.(*Owner).verify(0xc420047910, 0xac63c0, 0xc4200118e0)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/sql.go:106 +0x266
oauth-api_1 | main.handlerVerifyPost(0x7f032208d078, 0xc4201e00f0, 0xc42011c600)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/flowAuthCodeVerify.go:26 +0x114
oauth-api_1 | net/http.HandlerFunc.ServeHTTP(0x8bfe70, 0x7f032208d078, 0xc4201e00f0, 0xc42011c600)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1918 +0x44
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc42005a2a0, 0x7f032208d078, 0xc4201e00f0, 0xc42011c600)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/mux/mux.go:133 +0xed
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/rs/cors.(*Cors).Handler.func1(0x7f032208d078, 0xc4201e00f0, 0xc42011c300)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/rs/cors/cors.go:200 +0x108
oauth-api_1 | net/http.HandlerFunc.ServeHTTP(0xc4200cf440, 0x7f032208d078, 0xc4201e00f0, 0xc42011c300)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1918 +0x44
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers.loggingHandler.ServeHTTP(0xac6fc0, 0xc42000e018, 0xac7d00, 0xc4200cf440, 0xacb5c0, 0xc4200f01c0, 0xc42011c300)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers/handlers.go:69 +0x123
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers.(*loggingHandler).ServeHTTP(0xc4200cf460, 0xacb5c0, 0xc4200f01c0, 0xc42011c300)
oauth-api_1 | <autogenerated>:1 +0x75
oauth-api_1 | net/http.serverHandler.ServeHTTP(0xc4200ec340, 0xacb5c0, 0xc4200f01c0, 0xc42011c300)
oauth-api_1 | /usr/local/go/src/net/http/server.go:2619 +0xb4
oauth-api_1 | net/http.(*conn).serve(0xc4201460a0, 0xacbcc0, 0xc420056040)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1801 +0x71d
oauth-api_1 | created by net/http.(*Server).Serve
oauth-api_1 | /usr/local/go/src/net/http/server.go:2720 +0x288
oauth-api_1 | 2019/08/06 14:18:09 pq: invalid input syntax for integer: ""
oauth-api_1 | 2019/08/06 14:18:09 http: panic serving 172.19.0.1:60622: runtime error: invalid memory address or nil pointer dereference
oauth-api_1 | goroutine 459 [running]:
oauth-api_1 | net/http.(*conn).serve.func1(0xc4200760a0)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1697 +0xd0
oauth-api_1 | panic(0x829480, 0xaf7470)
oauth-api_1 | /usr/local/go/src/runtime/panic.go:491 +0x283
oauth-api_1 | database/sql.(*Rows).close(0x0, 0x0, 0x0, 0x0, 0x0)
oauth-api_1 | /usr/local/go/src/database/sql/sql.go:2742 +0x75
oauth-api_1 | database/sql.(*Rows).Close(0x0, 0x0, 0x0)
oauth-api_1 | /usr/local/go/src/database/sql/sql.go:2738 +0x3d
oauth-api_1 | main.(*Owner).verify(0xc420049910, 0xac63c0, 0xc4201681c0)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/sql.go:106 +0x266
oauth-api_1 | main.handlerVerifyPost(0x7f032208d078, 0xc42015c2d0, 0xc420140200)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/flowAuthCodeVerify.go:26 +0x114
oauth-api_1 | net/http.HandlerFunc.ServeHTTP(0x8bfe70, 0x7f032208d078, 0xc42015c2d0, 0xc420140200)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1918 +0x44
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc42005a2a0, 0x7f032208d078, 0xc42015c2d0, 0xc420140200)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/mux/mux.go:133 +0xed
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/rs/cors.(*Cors).Handler.func1(0x7f032208d078, 0xc42015c2d0, 0xc420140000)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/rs/cors/cors.go:200 +0x108
oauth-api_1 | net/http.HandlerFunc.ServeHTTP(0xc4200cf440, 0x7f032208d078, 0xc42015c2d0, 0xc420140000)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1918 +0x44
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers.loggingHandler.ServeHTTP(0xac6fc0, 0xc42000e018, 0xac7d00, 0xc4200cf440, 0xacb5c0, 0xc42019e000, 0xc420140000)
oauth-api_1 | /go/src/github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers/handlers.go:69 +0x123
oauth-api_1 | github.com/wildsurfer/postgrest-oauth-server/vendor/github.com/gorilla/handlers.(*loggingHandler).ServeHTTP(0xc4200cf460, 0xacb5c0, 0xc42019e000, 0xc420140000)
oauth-api_1 | <autogenerated>:1 +0x75
oauth-api_1 | net/http.serverHandler.ServeHTTP(0xc4200ec340, 0xacb5c0, 0xc42019e000, 0xc420140000)
oauth-api_1 | /usr/local/go/src/net/http/server.go:2619 +0xb4
oauth-api_1 | net/http.(*conn).serve(0xc4200760a0, 0xacbcc0, 0xc420056180)
oauth-api_1 | /usr/local/go/src/net/http/server.go:1801 +0x71d
oauth-api_1 | created by net/http.(*Server).Serve
oauth-api_1 | /usr/local/go/src/net/http/server.go:2720 +0x288
postgresql_1 | ERROR: invalid input syntax for integer: ""
postgresql_1 | CONTEXT: SQL function "verify_owner" statement 1
postgresql_1 | STATEMENT: SELECT oauth2.verify_owner('')
Reactions are currently unavailable
