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

mustInitCtx() failed when startup #27190

Closed
246859 opened this issue Sep 22, 2023 · 2 comments
Closed

mustInitCtx() failed when startup #27190

246859 opened this issue Sep 22, 2023 · 2 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@246859
Copy link

246859 commented Sep 22, 2023

Description

at the beginning,browser always displayed 500,When I tried to restart Gitea, I found that it was no longer possible to startup.
Actually, I didn't do anything that day.

2023/09/22 14:57:58 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 3502697
2023/09/22 14:57:58 cmd/web.go:148:serveInstalled() [I] Gitea version: 1.20.4 built with GNU Make 4.2.1, go1.20.8 : bindata, sqlite, sqlite_unlock_notify
2023/09/22 14:57:58 cmd/web.go:149:serveInstalled() [I] App path: /usr/local/bin/gitea
2023/09/22 14:57:58 cmd/web.go:150:serveInstalled() [I] Work path: /var/lib/gitea
2023/09/22 14:57:58 cmd/web.go:151:serveInstalled() [I] Custom path: /var/lib/gitea/custom
2023/09/22 14:57:58 cmd/web.go:152:serveInstalled() [I] Config file: /etc/gitea/app.ini
2023/09/22 14:57:58 cmd/web.go:153:serveInstalled() [I] Run mode: prod
2023/09/22 14:57:58 cmd/web.go:154:serveInstalled() [I] Prepare to run web server
2023/09/22 14:57:58 routers/init.go:112:InitWebInstalled() [I] Git version: 2.25.1, Wire Protocol Version 2 Enabled (home: /var/lib/gitea/data/home)
2023/09/22 14:57:58 ...les/setting/cache.go:75:loadCacheFrom() [I] Cache Service Enabled
2023/09/22 14:57:58 ...les/setting/cache.go:90:loadCacheFrom() [I] Last Commit Cache Service Enabled
2023/09/22 14:57:58 ...s/setting/session.go:74:loadSessionFrom() [I] Session Service Enabled
2023/09/22 14:57:58 ...es/setting/mailer.go:237:loadMailerFrom() [I] Mail Service Enabled
2023/09/22 14:57:58 ...es/setting/mailer.go:248:loadRegisterMailFrom() [I] Register Mail Service Enabled
2023/09/22 14:57:58 ...es/setting/mailer.go:259:loadNotifyMailFrom() [I] Notify Mail Service Enabled
2023/09/22 14:57:58 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/attachments
2023/09/22 14:57:58 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/avatars
2023/09/22 14:57:58 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-avatars
2023/09/22 14:57:58 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/lfs
2023/09/22 14:57:58 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-archive
2023/09/22 14:57:58 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
2023/09/22 14:57:58 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/packages
2023/09/22 14:57:58 routers/init.go:130:InitWebInstalled() [I] SQLite3 support is enabled
2023/09/22 14:57:58 routers/common/db.go:21:InitDBEngine() [I] Beginning ORM engine initialization.
2023/09/22 14:57:58 routers/common/db.go:28:InitDBEngine() [I] ORM engine initialization attempt #1/10...
2023/09/22 14:57:58 cmd/web.go:175:serveInstalled() [I] PING DATABASE mysql
2023/09/22 14:57:58 cmd/web.go:175:serveInstalled() [W] Table system_setting Column version db default is , struct default is 1
2023/09/22 14:57:58 routers/init.go:136:InitWebInstalled() [I] ORM engine initialization successful!
2023/09/22 14:57:58 ...er/issues/indexer.go:156:func2() [I] PID 3502697: Initializing Issue Indexer: bleve
2023/09/22 14:57:58 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2023/09/22 14:57:58 ...er/issues/indexer.go:246:func3() [I] Issue Indexer Initialization took 725.906µs
2023/09/22 14:57:58 routers/init.go:69:mustInitCtx() [F] code.gitea.io/gitea/routers.syncAppConfForGit(ctx) failed: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<body/onloa|..., bigger context ...|<body/onload=eval(atob("d2luZG93LmxvY2F0aW9uLnJlcGx|...

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

above

Screenshots

No response

Git Version

2.25.1

Operating System

ubuntu 22.04

How are you running Gitea?

command

gitea web --config /etc/gitea/app.ini

Database

MySQL/MariaDB

@wxiaoguang
Copy link
Contributor

I guess your system has been hacked, and the database is corrupted.

The hacker has injected malicious code code into your database: <body/onload=eval(atob("d2luZG93LmxvY2F0aW9uLnJlcGx|...

If you are sure your system is healthy, you need to figure out where that code comes from.

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Sep 22, 2023
@246859
Copy link
Author

246859 commented Sep 22, 2023

yes,you are right,after using base64 decoding,I got a url

window.location.replace("https://hzr0dm28m17c.com/ebmss0jq7?key=c90a3363013c5fcaaf8bf5a9a4e4086a")

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

2 participants