summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add doctor dbconsistency fix to delete repos with no owner (#27290)65432023-10-192-6/+79
| | | | to address #27273 replace #24873
* Delete repos of org when purge delete user (#27273)JakobDev2023-10-198-41/+67
| | | | | | | Fixes https://codeberg.org/forgejo/forgejo/issues/1514 I had to remove `RenameOrganization` to avoid circular import. We should really add some foreign keys to the database.
* Fix required checkboxes in issue forms (#27592)JakobDev2023-10-191-4/+7
| | | | | | | | | | | | | If you set a checkbox as required in a issue form at the moment, the checkbox is checked and read only, what does not make much sense. With this PR, the Checkbox actually needs to be checked. The label supports now also Markdown. This matches GitHub's behaviour. And yes, I know the CSS is a ugly workaround. It looks like the given CSS code is part Fomantic and I don't know how to change that. The Maintainers are free to change that. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/3f35be75-b0b4-42a7-9048-a4970384a035)
* Upgrade xorm (#27673)Nanguan Lin2023-10-194-5/+13
| | | Related to https://gitea.com/xorm/xorm/pulls/2341
* [docs] Add note that PROTOCOL config is case-sensitive (#25685)MiloCubed2023-10-192-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See [issue on gitea.com](https://gitea.com/gitea/gitea-docusaurus/issues/38), copied below for convenience: > Hello, may I first confirm that the app.ini PROTOCOL config is case sensitive (must be lowercase)? > > If so, I'd like to suggest for it to be highlighted in the [HTTPS Setup](https://docs.gitea.com/administration/https-setup#using-the-built-in-server) page. > Perhaps something like: > For the PROTOCOL=https field, make sure https is lowercase. Writing PROTOCOL=HTTPS may result in a SSL_ERROR_RX_RECORD_TOO_LONG error on Firefox or ERR_SSL_PROTOCOL_ERROR on Chrome and Edge. > > Background > At first I carelessly wrote PROTOCOL=HTTPS in my app.ini, and Firefox didn't allow me to connect because: > Secure Connection Failed > An error occurred during a connection to gitea.local.lan. SSL received a record that exceeded the maximum permissible length. > Error code: SSL_ERROR_RX_RECORD_TOO_LONG > I spent maybe half an hour troubleshooting my certs, ports, and other configs before backtracking to the start and realizing the capitalization difference there 😅. When I changed that config to lowercase, it worked. For this PR I added the note in the Config Cheat Sheet page and fixed the links to it from the HTTPS Setup page. Was originally thinking to put the note in the HTTPS Setup page itself, but since there are 2 sections referencing the PROTOCOL config, I was thinking it'd be neater and more concise to put it in the Config Cheat Sheet page instead. Especially since both sections already link to it, and I actually tried to check that link quite early on in my troubleshooting (but didn't pay much attention to it since the link was broken). ## Before/After screenshots as per [this repo's docs](https://github.com/go-gitea/gitea/tree/main/docs) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/e0745077-f6a9-4178-aa78-2155ccb58fd6) Note: For this the links weren't broken, the links fix is because they were broken on gitea.com's docs (see below). After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/748b3759-aa13-4ad0-9811-c6664b6cdd35) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/4ff2e4e6-3528-4cea-a7a6-64a75854eb99) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/c8e07ab6-5a26-4582-a4d0-b83d1f11a30e) ## Before/After screenshots as per [gitea.com's docs](https://gitea.com/gitea/gitea-docusaurus) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/4d26ea67-b987-4b91-810b-c53852a13078) After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/24d02907-7f9e-4228-a190-7696623c00f7) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/978eedfd-ce05-488d-ab54-9d7f3c9f233d) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/12d22566-a2b0-45ec-8302-a88eae9365d8)
* Remove network call on `make clean` (#27689)techknowlogick2023-10-191-1/+0
| | | | | fix #27653 credit to silverwind for finding issue
* Add unit tests for action runner token (#27670)Nanguan Lin2023-10-193-0/+93
| | | In case the behavior of the register token changes.
* Typos fixed in documentation files (#27687)SandeshPyakurel2023-10-192-4/+4
| | | Typos fixed in multiple docs files.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-192-12/+385
|
* Add link for repositories README file (#27684)sebastian-sauer2023-10-181-2/+2
| | | | | | | | | | | | | | | this allows to deep link to the readme section of a repository. fixes #27641 Screenshots: No changes on initial display: ![image](https://github.com/go-gitea/gitea/assets/1135157/efbef50e-c24b-4cca-b19f-9092e70b5a5f) On hover the link is shown: ![image](https://github.com/go-gitea/gitea/assets/1135157/c8dff2b8-31dc-4b7b-96d0-27642318483d)
* Fix typo "GetLatestRunnerToken" (#27680)Jason Song2023-10-183-5/+5
|
* Clipboard copy enhancements (#27669)silverwind2023-10-182-7/+19
| | | | | | | | | | | | | | | | | | | | | 1. Do not show temporary tooltips that are triggered from within dropdowns. Previously this resulted in the tooltip being stuck to top-left of the page like seen on issue comment URL copy. I could not figure out any tippy options that prevent this, so I think it's better to just not show it. 1. Refactor `initGlobalCopyToClipboardListener` so that it does not run a often useless `document.querySelector` on every click, make `data-clipboard-text-type` work with `data-clipboard-target`. No use in current code base but still good to have. Finally some minor code cleanup in the function. Point 1 is for this copy button: <img width="229" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/81f34746-8ea5-43d9-8c6f-f6f417a9e4ad"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary parameter (#27671)Lunny Xiao2023-10-188-25/+23
|
* Always delete existing scheduled action tasks (#27662)KN4CK3R2023-10-181-11/+8
| | | Fixes #27650
* Support allowed hosts for webhook to work with proxy (#27655)Jason Song2023-10-183-21/+73
| | | | | | | | | | | | | | | | | When `webhook.PROXY_URL` has been set, the old code will check if the proxy host is in `ALLOWED_HOST_LIST` or reject requests through the proxy. It requires users to add the proxy host to `ALLOWED_HOST_LIST`. However, it actually allows all requests to any port on the host, when the proxy host is probably an internal address. But things may be even worse. `ALLOWED_HOST_LIST` doesn't really work when requests are sent to the allowed proxy, and the proxy could forward them to any hosts. This PR fixes it by: - If the proxy has been set, always allow connectioins to the host and port. - Check `ALLOWED_HOST_LIST` before forwarding.
* Improve the list header in milestone page (#27302)yp053272023-10-188-261/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ui of list header in milestone page is not same as issue and pr list page. And they are using different template codes which can be merged into one. Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/29eb426c-2dd6-4cf2-96e0-82339fb631bb) ![image](https://github.com/go-gitea/gitea/assets/18380374/b36c4dff-469a-4395-8a02-a8c54e17ab21) ![image](https://github.com/go-gitea/gitea/assets/18380374/d882c74a-451b-431d-b58e-3635a15d9718) ![image](https://github.com/go-gitea/gitea/assets/18380374/292cd38d-1b50-47f1-b32c-9b5de90ce5fb) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/4529234e-67dc-4e17-9440-e638be4fbc41) ![image](https://github.com/go-gitea/gitea/assets/18380374/c15b4d86-0762-497b-b28d-72d09443d629) --------- Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
* Fix poster is not loaded in get default merge message (#27657)Lunny Xiao2023-10-171-0/+3
|
* Hide archived labels by default from the suggestions when assigning labels ↵puni98692023-10-176-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | for an issue (#27451) Followup of #27115 Finally closes #25237 ## Screenshots ### Issue Sidebar <img width="513" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/9f7fda2f-5a03-4684-8619-fd3498a95b41"> ### PR sidebar <img width="367" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/53db9b64-faec-4a67-91d6-76945596a469"> ### PR sidebar with archived labels shown <img width="352" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/9dc5050f-4e69-4f76-bb83-582480a2281e"> --------- Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: silverwind <me@silverwind.io>
* actions/setup-go use go-version-file (#27651)Yevhen Pavlov2023-10-177-17/+20
| | | | These changes will allow not to specify the version of go in every pipeline.
* Update agit-support.en-us.md (#27652)Sandro Santilli2023-10-171-6/+9
| | | | | Clarify Agit PR creation documentation See https://github.com/go-gitea/gitea/issues/27579
* cleanup repo details icons/labels (#27644)Denys Konovalov2023-10-165-60/+28
| | | | | | | Fix #27596 Change confusing behavior when showing information about a repo via labels and icons. Implement changes proposed by @lng2020 in https://github.com/go-gitea/gitea/pull/27627#pullrequestreview-1678787673.
* Improve dropdown button alignment and fix hover bug (#27632)wxiaoguang2023-10-163-1/+12
| | | | 1. fix #27631 , and add samples to devtest page 2. fix incorrect color for "ui dropdown button" when hover
* [skip ci] Updated licenses and gitignoresGiteaBot2023-10-162-0/+58
|
* Improve retrying index issues (#27554)Jason Song2023-10-155-40/+52
| | | Fix #27540
* Replace more db.DefaultContext (#27628)Lunny Xiao2023-10-1533-85/+99
| | | Target #27065
* Fix 404 when there is an internal version of package (#27615)Nanguan Lin2023-10-151-1/+1
| | | | close #27601 The Docker registry has an internal version, which leads to 404
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-151-1/+1
|
* Add anchor to review types (#26894)Earl Warren2023-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | - The review type '22' is a general comment type that is attached to single codecomments, reviews with multiple comments or to simple approve and request changes comment. This comment can be used to create a link towards this action on an pull request. - Adds an anchor to the review comment type, so that when its getting linked to it, it actually jumps towards that event. - This also now fixes the behavior that after you created a review you will be redirected to that review and because this is an general comment type other mails will also be 'fixed' such as the approved or request changes. - Resolves https://codeberg.org/forgejo/forgejo/issues/1248 (cherry picked from commit 1741a5f1fe6adc68bb5f87bdd1c5bdc5bfaa45c7) --------- Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
* Update readme to remove drone svg (#27624)Nanguan Lin2023-10-142-4/+4
|
* Change the default branch in the agit docs (#27621)Nanguan Lin2023-10-142-6/+6
|
* Final round of `db.DefaultContext` refactor (#27587)JakobDev2023-10-1464-242/+250
| | | Last part of #27065
* Fix permissions for Token DELETE endpoint to match GET and POST (#27610)Evan Tobin2023-10-142-3/+30
| | | | | | | | Fixes #27598 In #27080, the logic for the tokens endpoints were updated to allow admins to create and view tokens in other accounts. However, the same functionality was not added to the DELETE endpoint. This PR makes the DELETE endpoint function the same as the other token endpoints and adds unit tests
* Enhanced auth token / remember me (#27606)KN4CK3R2023-10-1423-103/+418
| | | | | | | | | | | | | | | | | Closes #27455 > The mechanism responsible for long-term authentication (the 'remember me' cookie) uses a weak construction technique. It will hash the user's hashed password and the rands value; it will then call the secure cookie code, which will encrypt the user's name with the computed hash. If one were able to dump the database, they could extract those two values to rebuild that cookie and impersonate a user. That vulnerability exists from the date the dump was obtained until a user changed their password. > > To fix this security issue, the cookie could be created and verified using a different technique such as the one explained at https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence#secure-remember-me-cookies. The PR removes the now obsolete setting `COOKIE_USERNAME`.
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-1419-64/+13
|
* rm outdated docs from some languages (#27530)techknowlogick2023-10-1347-2068/+0
| | | related to #27499
* Upgrade go dependencies (#27599)Chongyi Zheng2023-10-132-62/+77
| | | | | | | | | | Upgrade all dependencies in `go.mod` `golang.org/x/net` v0.17.0 also fixes [CVE-2023-39325](https://github.com/advisories/GHSA-4374-p667-p6c8) --------- Co-authored-by: delvh <dev.lh@web.de>
* Fix build errors on BSD (in BSDMakefile) (#27594)Sergey Zolotarev2023-10-131-2/+2
| | | | | | | | | | | | | | | | | | | 1. `make build` fails because `||` and `&&` have the same precedence in sh/bash, so the `false` command always evaluated (leading to an error). ``` + which gmake /usr/local/bin/gmake + false *** Failed target: .BEGIN *** Failed command: which "gmake" || printf "Error: GNU Make is required!\n\n" 1>&2 && false *** Error code 1 ``` 2. When `GPREFIX` is set to an empty string with quotation marks, `gmake` mistakenly thinks that it's a file name: ``` gmake: *** empty string invalid as file name. Stop. ```
* Enable shorthands in `declaration-strict-value` linter (#27597)silverwind2023-10-132-2/+2
| | | | | | | | | | | Enable [shorthand matching](https://github.com/AndyOGo/stylelint-declaration-strict-value#expandshorthand) in this lint rule and match color properties by regex. Patterns like this will now fail lint: ```css background: #123456; border: 1px sold rgba(0,0,0,0); ```
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-131-89/+114
|
* Make disk clean action a bit more robust (#27590)silverwind2023-10-121-6/+9
|
* [skip ci] Updated translations via CrowdinGiteaBot2023-10-122-0/+52
|
* Keep filter when showing unfiltered results on explore page (#27192)JakobDev2023-10-111-1/+1
| | | | | | | Fixes https://codeberg.org/Codeberg/Community/issues/1302 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Don't show Link to TOTP if not set up (#27585)JakobDev2023-10-112-3/+13
|
* Fix data-race bug when accessing task.LastRun (#27584)wxiaoguang2023-10-111-2/+1
|
* Fix template bug (#27581)Lunny Xiao2023-10-111-1/+2
| | | Regression from #27414
* Replace ajax with fetch, improve image diff (#27267)silverwind2023-10-119-81/+95
| | | | | | | | | | | 1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Replace assert.Fail with assert.FailNow (#27578)Nanguan Lin2023-10-1114-38/+20
| | | | | | | | | assert.Fail() will continue to execute the code while assert.FailNow() not. I thought those uses of assert.Fail() should exit immediately. PS: perhaps it's a good idea to use [require](https://pkg.go.dev/github.com/stretchr/testify/require) somewhere because the assert package's default behavior does not exit when an error occurs, which makes it difficult to find the root error reason.
* Fix the robots.txt pathLunny Xiao2023-10-112-2/+2
|
* show manual cron run's last time (#27544)Earl Warren2023-10-113-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | - Currently in the cron tasks, the 'Previous Time' only displays the previous time of when the cron library executes the function, but not any of the manual executions of the task. - Store the last run's time in memory in the Task struct and use that, when that time is later than time that the cron library has executed this task. - This ensures that if an instance admin manually starts a task, there's feedback that this task is/has been run, because the task might be run that quick, that the status icon already has been changed to an checkmark, - Tasks that are executed at startup now reflect this as well, as the time of the execution of that task on startup is now being shown as 'Previous Time'. - Added integration tests for the API part, which is easier to test because querying the HTML table of cron tasks is non-trivial. - Resolves https://codeberg.org/forgejo/forgejo/issues/949 (cherry picked from commit fd34fdac1408ece6b7d9fe6a76501ed9a45d06fa) --------- Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: silverwind <me@silverwind.io>
* fully replace drone with actions (#27556)techknowlogick2023-10-115-431/+267
| | | this builds binaries and docker images for tags