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

Application crash after authentication sources update #16342

Closed
2 of 6 tasks
Mattia-Nocerino opened this issue Jul 5, 2021 · 9 comments · Fixed by #16447
Closed
2 of 6 tasks

Application crash after authentication sources update #16342

Mattia-Nocerino opened this issue Jul 5, 2021 · 9 comments · Fixed by #16447
Labels

Comments

@Mattia-Nocerino
Copy link

  • Gitea version (or commit ref): 1.15.0
  • Git version: 2.30.2
  • Operating system: running on docker using image gitea/gitea:latest
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

| 2021/07/05 09:42:29 ...dels/login_source.go:408:GetLoginSourceByID() [I] [SQL] SELECT TOP 1 [id], [type], [name], [is_actived], [is_sync_enabled], [cfg], [created_unix], [updated_unix] FROM [login_source] WHERE [id]=? [8] - 900.206µs
| 2021/07/05 09:42:29 routers/web/base.go:131:1() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
| /usr/local/go/src/runtime/panic.go:212 (0x43da5a)
| /usr/local/go/src/runtime/signal_unix.go:734 (0x457a32)
| /go/src/code.gitea.io/gitea/models/login_source.go:283 (0x2232b9a)
| /go/src/code.gitea.io/gitea/routers/web/admin/auths.go:310 (0x2232bab)
| /go/src/code.gitea.io/gitea/modules/web/route.go:64 (0x201ab5b)
2021/07/05 09:42:29 ...common/middleware.go:64:1() [E] PANIC: interface conversion: interface {​​​}​​​ is nil, not *context.APIContext
| /usr/local/go/src/runtime/iface.go:261 (0x412e4e)
| /go/src/code.gitea.io/gitea/modules/context/api.go:135 (0x224bffe)
| /go/src/code.gitea.io/gitea/routers/web/base.go:151 (0x224b680)
| /usr/local/go/src/runtime/panic.go:965 (0x43f998)
| /usr/local/go/src/runtime/panic.go:212 (0x43da5a)
2021/07/05 09:42:29 Completed GET /admin/auths/8 500 Internal Server Error in 32.85603ms

Description

Whenever we try to make an update on the authentication sources the application crashes.
We managed to get the query that is being executed on our SQL Server istance and we noticed that:

  • On the first insert, config json string is being passed correctly.
  • On update the json string is converted to hexadecimal. This is the query:
    exec sp_executesql N'UPDATE [login_source] SET [type] = @p1, [name] = @p2, [is_actived] = @p3, [is_sync_enabled] = @p4, [cfg] = @p5, [updated_unix] = @p6 WHERE [id]=@p7',N'@p1 bigint,@p2 nvarchar(9),@p3 bit,@p4 bit,@p5 varbinary(818),@p6 bigint,@p7 bigint',@p1=2,@p2=N'TDT-LDAPS',@p3=1,@p4=1,@p5=0X7B224E616D65223A22746573742D4C44415053222C22486F7374223A22746573742E746573742E6974222C22506F7274223A3633362C22536563757269747950726F746F636F6C223A312C22536B6970566572696679223A747275652C2242696E64444E223A22434E3D4C64617020536572766963652C4F553D4C6461702C4F553D41757468656E7469636174696F6E2C4F553D5365727669636573204163636F756E742C44433D746573742C44433D6974222C2242696E6450617373776F7264456E6372797074223A226436626238323539663164333834303165636538393431333237343433306461356331653366643264366236393638613264303439303734326436613165393038623530366564633434613461336261222C2242696E6450617373776F7264223A22222C225573657242617365223A2244433D746573742C44433D6974222C2255736572444E223A22222C22417474726962757465557365726E616D65223A2273414D4163636F756E744E616D65222C224174747269627574654E616D65223A22676976656E6E616D65222C224174747269627574655375726E616D65223A22736E222C224174747269627574654D61696C223A226D61696C222C2241747472696275746573496E42696E64223A66616C73652C224174747269627574655353485075626C69634B6579223A22222C225365617263685061676553697A65223A302C2246696C746572223A22285C75303032362873414D4163636F756E744E616D653D257329286D656D6265724F663D434E3D5379732041646D696E2C4F553D496E6672617374727563747572652C4F553D746573742C4F553D49542C4F553D5573657273204F752C44433D746573742C44433D69742929222C2241646D696E46696C746572223A22222C225265737472696374656446696C746572223A22222C22456E61626C6564223A747275652C22416C6C6F7744656163746976617465416C6C223A66616C73652C2247726F757073456E61626C6564223A66616C73652C2247726F7570444E223A22222C2247726F757046696C746572223A22222C2247726F75704D656D626572554944223A22222C2255736572554944223A22227D,@p6=1625476484,@p7=5

Screenshots

@zeripath
Copy link
Contributor

zeripath commented Jul 5, 2021

Should have been fixed by #16268

Exactly what sha on 1.15 are you using?

@Mattia-Nocerino
Copy link
Author

Should have been fixed by #16268

Exactly what sha on 1.15 are you using?

Sorry but I don't know how to check what sha i'm currently using...

I hope this screenshot helps:
gitea version

Powered by Gitea Version: 1.15.0+dev-540-g64122fe10

@noerw noerw added the type/bug label Jul 10, 2021
@wmantly
Copy link
Contributor

wmantly commented Jul 15, 2021

I am getting the same bug with Postgres in 1.14.4.

@zeripath
Copy link
Contributor

I am getting the same bug with Postgres in 1.14.4.

I'm suspicious that you're facing something else. So please give us logs.

@wmantly
Copy link
Contributor

wmantly commented Jul 15, 2021

I just updated to 1.15.0-rc1, same issue on ubuntu 20.04. I am migrating the gitea install from another server.

, "updated_unix" FROM "login_source" WHERE (is_actived = $1 and type = $2) [true 6] - 1.415694ms
2021/07/15 21:46:23 ...dels/login_source.go:385:ActiveLoginSources() [I] [SQL] SELECT "id", "type", "name", "is_actived", "is_sync_enabled", "cfg", "created_unix", "updated_unix" FROM "login_source" WHERE (is_actived = $1 and type = $2) [true 7] - 1.005933ms
2021/07/15 21:46:23 ...rm.io/xorm/engine.go:1214:Get() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme", "keep_activity_private" FROM "user" WHERE "lower_name"=$1 LIMIT 1 [wmantly] - 1.314661ms
2021/07/15 21:46:23 ...dels/login_source.go:839:UserSignIn() [I] [SQL] SELECT "id", "type", "name", "is_actived", "is_sync_enabled", "cfg", "created_unix", "updated_unix" FROM "login_source" WHERE "id"=$1 LIMIT 1 [1] - 868.438µs
2021/07/15 21:46:23 routers/web/base.go:131:1() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
        /usr/local/go/src/runtime/panic.go:212 (0x43e09a)
        /usr/local/go/src/runtime/signal_unix.go:734 (0x458072)
        /source/modules/auth/ldap/ldap.go:150 (0x11ff197)
        /source/modules/auth/ldap/ldap.go:240 (0x12003d8)
        /source/models/login_source.go:497 (0x13f0f38)
        /source/models/login_source.go:760 (0x13f2aba)
        /source/models/login_source.go:846 (0x13f337b)
        /source/routers/web/user/auth.go:177 (0x21c2ee9)
        /source/modules/web/route.go:64 (0x2020f5b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20448c1)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/context/context.go:776 (0x170a349)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/web/base.go:186 (0x2255c70)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x14f51ae)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/public/public.go:42 (0x166b72e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:72 (0x204939d)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/logger.go:23 (0x20485db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x20451c7)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x204082e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:25 (0x2048edc)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x16e7070)
        /source/modules/web/route.go:298 (0x2020493)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x1205d53)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /usr/local/go/src/net/http/server.go:2867 (0x7c0702)
        /usr/local/go/src/net/http/server.go:1932 (0x7bbc2c)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aae0)

2021/07/15 21:46:23 ...common/middleware.go:64:1() [E] PANIC: interface conversion: interface {} is nil, not *context.APIContext
        /usr/local/go/src/runtime/iface.go:261 (0x41348e)
        /source/modules/context/api.go:135 (0x2255bbe)
        /source/routers/web/base.go:151 (0x2255240)
        /usr/local/go/src/runtime/panic.go:965 (0x43ffd8)
        /usr/local/go/src/runtime/panic.go:212 (0x43e09a)
        /usr/local/go/src/runtime/signal_unix.go:734 (0x458072)
        /source/modules/auth/ldap/ldap.go:150 (0x11ff197)
        /source/modules/auth/ldap/ldap.go:240 (0x12003d8)
        /source/models/login_source.go:497 (0x13f0f38)
        /source/models/login_source.go:760 (0x13f2aba)
        /source/models/login_source.go:846 (0x13f337b)
        /source/routers/web/user/auth.go:177 (0x21c2ee9)
        /source/modules/web/route.go:64 (0x2020f5b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20448c1)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/context/context.go:776 (0x170a349)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/web/base.go:186 (0x2255c70)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x14f51ae)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/public/public.go:42 (0x166b72e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:72 (0x204939d)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/logger.go:23 (0x20485db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x20451c7)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x204082e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:25 (0x2048edc)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x16e7070)
        /source/modules/web/route.go:298 (0x2020493)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x1205d53)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /usr/local/go/src/net/http/server.go:2867 (0x7c0702)
        /usr/local/go/src/net/http/server.go:1932 (0x7bbc2c)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aae0)

If you need more logging, please let me know

@wmantly
Copy link
Contributor

wmantly commented Jul 15, 2021

After a bit more inspection, only LDAP users are effected and this happened when I try to edit the LDAP auth source from the GUI

2021/07/15 21:52:43 ...s/context/context.go:740:1() [D] Session ID: 492a694ba4c7a56d
2021/07/15 21:52:43 ...s/context/context.go:741:1() [D] CSRF Token: <token>
2021/07/15 21:52:43 models/user.go:1370:getUserByID() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme", "keep_activity_private" FROM "user" WHERE "id"=$1 LIMIT 1 [20] - 1.184443ms
2021/07/15 21:52:43 ...s/issue_stopwatch.go:67:HasUserStopwatch() [I] [SQL] SELECT "id", "issue_id", "user_id", "created_unix" FROM "stopwatch" WHERE (user_id = $1) LIMIT 1 [20] - 897.129µs
2021/07/15 21:52:43 ...dels/login_source.go:408:GetLoginSourceByID() [I] [SQL] SELECT "id", "type", "name", "is_actived", "is_sync_enabled", "cfg", "created_unix", "updated_unix" FROM "login_source" WHERE "id"=$1 LIMIT 1 [1] - 370.103µs
2021/07/15 21:52:43 routers/web/base.go:131:1() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
        /usr/local/go/src/runtime/panic.go:212 (0x43e09a)
        /usr/local/go/src/runtime/signal_unix.go:734 (0x458072)
        /source/models/login_source.go:283 (0x223c77a)
        /source/routers/web/admin/auths.go:310 (0x223c78b)
        /source/modules/web/route.go:64 (0x2020f5b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20448c1)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/context/context.go:776 (0x170a349)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/web/base.go:186 (0x2255c70)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x14f51ae)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/public/public.go:42 (0x166b72e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:72 (0x204939d)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/logger.go:23 (0x20485db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x20451c7)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x204082e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:25 (0x2048edc)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x16e7070)
        /source/modules/web/route.go:298 (0x2020493)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x1205d53)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /usr/local/go/src/net/http/server.go:2867 (0x7c0702)
        /usr/local/go/src/net/http/server.go:1932 (0x7bbc2c)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aae0)

2021/07/15 21:52:43 ...common/middleware.go:64:1() [E] PANIC: interface conversion: interface {} is nil, not *context.APIContext
        /usr/local/go/src/runtime/iface.go:261 (0x41348e)
        /source/modules/context/api.go:135 (0x2255bbe)
        /source/routers/web/base.go:151 (0x2255240)
        /usr/local/go/src/runtime/panic.go:965 (0x43ffd8)
        /usr/local/go/src/runtime/panic.go:212 (0x43e09a)
        /usr/local/go/src/runtime/signal_unix.go:734 (0x458072)
        /source/models/login_source.go:283 (0x223c77a)
        /source/routers/web/admin/auths.go:310 (0x223c78b)
        /source/modules/web/route.go:64 (0x2020f5b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20448c1)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/web/route.go:103 (0x2021636)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/context/context.go:776 (0x170a349)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/web/base.go:186 (0x2255c70)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x14f51ae)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/modules/public/public.go:42 (0x166b72e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16e72ea)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16ed6db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16e978a)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:72 (0x204939d)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/logger.go:23 (0x20485db)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x20451c7)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x204082e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/routers/common/middleware.go:25 (0x2048edc)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x16e7070)
        /source/modules/web/route.go:298 (0x2020493)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x1205d53)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd143)
        /usr/local/go/src/net/http/server.go:2867 (0x7c0702)
        /usr/local/go/src/net/http/server.go:1932 (0x7bbc2c)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aae0)

@zeripath
Copy link
Contributor

Yup ok they are they same. Something is wrong with #16268 (and its backport here.)

@zeripath
Copy link
Contributor

Damn there's a double indirection here!!

@zeripath
Copy link
Contributor

The suggestions on https://github.com/go-gitea/gitea/pull/16268/files show how to fix this.

Sorry about this.

zeripath added a commit to zeripath/gitea that referenced this issue Jul 15, 2021
Unfortunately go-gitea#16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix go-gitea#16342

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Jul 15, 2021
Backport go-gitea#16447

Unfortunately go-gitea#16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix go-gitea#16342

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Jul 15, 2021
Backport go-gitea#16447

Unfortunately go-gitea#16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix go-gitea#16342

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick pushed a commit that referenced this issue Jul 16, 2021
Backport #16447

Unfortunately #16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix #16342

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick pushed a commit that referenced this issue Jul 16, 2021
Backport #16447

Unfortunately #16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix #16342

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick added a commit that referenced this issue Jul 16, 2021
Unfortunately #16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix #16342

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
Unfortunately go-gitea#16268 contained a terrible error, whereby there was a double
indirection taken when unmarshalling the source data. This fatally breaks
authentication configuration reading.

Fix go-gitea#16342

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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.

4 participants