Gitea 1.21.0 → 1.22.0
12 versions, 1 with breaking changes, 0 required stops
Version by version, oldest first
1.21.1 – 1.21.11: no action items (11 versions)
1.22.0 2024-05-27
Breaking
- Improve reverse proxy documents and clarify the AppURL guessing behavior (#31003) (#31020)
- Remember log in for a month by default (#30150)
- Breaking summary for template refactoring (#29395)
- All custom templates need to follow these changes
- Recommend/convert to use case-sensitive collation for MySQL/MSSQL (#28662)
- Make offline mode as default to not connect external avatar service by default (#28548)
- Include public repos in the doer's dashboard for issue search (#28304)
- Use restricted sanitizer for repository description (#28141)
- Support storage base path as prefix (#27827)
- Enhanced auth token / remember me (#27606)
- Rename the default themes to
gitea-light,gitea-dark,gitea-auto(#27419) - If you didn't see the new themes, please remove the
[ui].THEMESconfig option fromapp.ini - Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)
Breaking — from the release blog
Increased DB requirements (#27337)
Gitea only officially supports DBs that have not reached EOL. There are many database versions that have reached End of Life.
- Ref: https://endoflife.date/mysql
- Ref: https://endoflife.date/postgresql
- Ref: https://endoflife.date/mssqlserver
As such, we have increased the DB requirements as follows:
MySQL 5.7→MySQL 8.0PostgreSQL 10→PostgreSQL 12MSSQL 2008→MSSQL 2012
Caution
Support for
MySQL 5.7,PostgreSQL 10/11, andMSSQL 2008is dropped. You are encouraged to upgrade to supported versions.
If you have to use an unsupported database version, please get in touch with us for information on our Extended Support Contracts. We can provide testing and support for older databases and integrate those fixes into the Gitea codebase.
MySQL/MSSQL DBs should be case sensitive (#28662)
MySQL (including MariaDB) and MSSQL create databases case-insensitively by default, meaning for example that gitea is equal to GITea.
Historically, this led to many bug reports of functionality behaving unexpectedly, i.e. branches not being able to be inserted because a new branch only differed in casing compared to an existing branch. Gitea was never intended to be used in a case-insensitive DB.
Now, Gitea will explicitly warn you if it detects being run in a case-insensitive DB. If you haven't done so already, please convert your DB to a case-sensitive one.
Note
PostgresandSQLiteusers are most likely unaffected as those DBs are already case-sensitive by default.
Breaking summary for template refactoring (#29395)
The template system has been refactored, and some template functions may have been changed or removed.
Safeis renamed toSafeHTML, and in most cases it shouldn't be used.Escapeis renamed toHTMLEscape, and in most cases it shouldn't be used. The template should escape most variables automatically.Str2htmlis renamed toSanitizeHTML, only use it when necessary, it only "sanitizes" the input by pre-defined rules, but it doesn't "render" or "convert" the content.- Use
HTMLFormatinstead ofprintfwhen processing HTML-related contents.
Caution
If you use custom templates (either for the UI or for emails), please read through #29395 to ensure your custom templates will work again.
Default theme change (#27419)
Gitea simplified its theme naming in this release.
The available themes are now gitea-light (previously gitea), gitea-dark (previously arc-green), gitea-auto (previously auto).
This has multiple effects:
- If you have any custom themes named like that, please rename them to continue using them.
- It is now possible to check which theme is active by querying the attribute
html[data-theme] instead of the previous html.theme-<theme> when expressing the query as a CSS selector. This change is especially important for third-party tooling whose behavior depends on which theme is active.
- If you set
[ui].DEFAULT_THEMEpreviously, you need to change it to the new theme name.
If you see a black-and-white UI after the update, it is likely that you need to update this setting as the theme cannot be found.
Changed markdown highlighting syntax (#29121)
As we will explain in more detail in the new features, Gitea is now capable of additional alert types using a new syntax.
At the same time, the old syntax > **Note** A note/> **Warning** A warning has been removed, so please rewrite your existing markdown documents to the new syntax where applicable.
If you used:
> **Note** My note
or
> **Warning** My warning
Rewrite these as:
> [!NOTE]
> My note
or
> [!WARNING]
> My warning
Only minimal markdown allowed in repo descriptions (#28141)
Previously, the repository description accepted any sort of markdown. Now, you can only use basic markdown features such as bold, italic, or highlighted text.
Breaking API changes (#27153, #28339)
There were two minor breaking changes to the API in this release:
- Previously, the push mirror API returned timestamps in an incorrect format. This has now been updated to behave exactly like any other timestamp.
- The already deprecated (and due to a bug, unusable) pagination parameter
per_pagehas been removed from thelist releasesendpoint. Instead, you should use thelimitparameter.
Login is now remembered for a month by default (#30150)
Previously, your login was only remembered for a week by default. However, many instances don't set the setting and have no explicit security requirements, so having such a short interval is not user-friendly.
If your instance requires a high level of security, you may want to set
[security]
// highlight-next-line
LOGIN_REMEMBER_DAYS = 7
or something similar again.
Removed configurations (#27606, #28527)
Some settings are no longer used. If you previously set any of them, you can now safely remove them from your config:
- ~~
[security].COOKIE_USERNAME~~ - ~~
[cache].ENABLED~~ - ~~
[cache.last_commit].ENABLED~~
Caution
Caches are now enabled by default and cannot be disabled. The default adapter is
memory, you can change it toredis, etc. More details are in https://docs.gitea.com/administration/config-cheat-sheet#cache-cache
Support storage base path as prefix (#27827)
This PR will affect all configurations having base_path in the storage section but no base_path in the derived storage configuration sections. The base_path on [storage] will become a prefix for them but will not share the same base_path.
[storage]
; Now it becomes a prefix of derived base_path but not share the name
// highlight-next-line
base_path = xxx
No Gravatar by default (#28548)
The default value of [server].OFFLINE_MODE has been changed to true, so Gitea will not allow Gravatar queries by default.
However, most existing instances won't be affected by this, as this setting is only used as the default value for the Gravatar settings, not the actual value.
Additionally, it is saved into the config when you install Gitea.
Release notes from github.com/go-gitea/gitea/releases, and the official release blog, checked 17 hours ago. Only text the vendor marks as breaking, or puts in a warning/caution/important note, is shown; read the full notes for anything else.