Commit graph

13916 commits

Author SHA1 Message Date
Jason Song
15b189b570
Avoid frequent string2bytes conversions (#20940)
Fix #20939
2022-08-24 12:50:13 +01:00
KN4CK3R
9e0c43777e
Display total blob size of a package version. (#20927)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-08-24 13:48:33 +08:00
KN4CK3R
103b94f96e
Display all files. (#20917)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-08-23 21:39:25 -04:00
KN4CK3R
1939e87348
Enhance package date display (#20928)
* Use better date display.

* Update templates/package/view.tmpl
2022-08-23 21:39:00 -04:00
silverwind
7d1765e940 [skip ci] Updated translations via Crowdin 2022-08-24 00:20:55 +00:00
silverwind
2b0093cb9f
Forbid HTML string tooltips (#20935)
Tippy allows HTML strings to be passed as content but we do not use this
feature (we do pass HTML only as Element), so it's better to disable it
for increased security.

Ref: https://atomiks.github.io/tippyjs/v6/html-content/#string
2022-08-23 16:17:42 -04:00
zeripath
aa2e473991
Set no-tags in git fetch on compare (#20893)
* Set no-tags in git fetch on compare

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds `--no-tags` to the `git fetch` call.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update modules/git/repo_compare.go

* Update modules/git/repo_compare.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-23 14:12:43 -04:00
Kiara Grouwstra
3d870f6dde
Update comparison.en-us.md: link subgroups issue (#20905)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-08-23 10:13:41 -04:00
silverwind
56220515fc
Enable contenthash in filename for dynamic assets (#20813)
This should solve the main problem of dynamic assets getting stale after
a version upgrade. Everything not affected will use query-string based
cache busting, which includes files loaded via HTML or worker scripts.
2022-08-23 20:58:04 +08:00
oliverpool
0a9ed54abb
refactor webhook *EditPost (#20780) 2022-08-23 02:52:35 -04:00
John Olheiser
fa8fc5d3a7
Changelog 1.17.1 (#20833) (#20919)
* Changelog 1.17.1 (#20833)

* Changelog 1.17.1

 ## [1.17.1](https://github.com/go-gitea/gitea/releases/tag/1.17.1) - 2022-08-17

* SECURITY
  * Correctly escape within tribute.js (#20831) (#20832)
* FEATURES
  * Add support for NuGet API keys (#20721) (#20734)
* ENHANCEMENTS
  * Display project in issue list (#20583)
  * Add disable download source configuration (#20548) (#20579)
* BUGFIXES
  * Use the total issue count for UI (#20785) (#20827)
  * Add proxy host into allow list (#20798) (#20819)
  * Add missing translation for queue flush workers (#20791) (#20792)
  * Improve comment header for mobile (#20781) (#20789)
  * Fix git.Init for doctor sub-command (#20782) (#20783)
  * Check webhooks slice length before calling xorm (#20642) (#20768)
  * Remove manual rollback for failed generated repositories (#20639) (#20762)
  * Use correct field name in npm template (#20675) (#20760)
  * Keep download count on Container tag overwrite (#20728) (#20735)
  * Fix v220 migration to be compatible for MSSQL 2008 r2 (#20702) (#20707)
  * Use request timeout for git service rpc (#20689) (#20693)
  * Send correct NuGet status codes (#20647) (#20677)
  * Use correct context to get package content (#20673) (#20676)
  * Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584) (#20663)
  * Add default commit messages to PR for squash merge (#20618) (#20645)
  * Fix package upload for files >32mb (#20622) (#20635)
  * Fix the new-line copy-paste for rendered code (#20612)
  * Clean up and fix clone button script (#20415 & #20600) (#20599)
  *  Fix default merge style (#20564) (#20565)
  * Add repository condition for issue count (#20454) (#20496)
* MISC
  * Make branch icon stand out more (#20726) (#20774)
  * Fix loading button with invalid form (#20754) (#20759)
  * Add username check to doctor (#20140) (#20671)
  * Enable Wire 2 for Internal SSH Server (#20616) (#20617)
  *  Fix SecToTime edge-cases (#20610) (#20611)

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: John Olheiser <john+github@jolheiser.com>

* Update CHANGELOG.md

Co-authored-by: delvh <dev.lh@web.de>

* Update CHANGELOG.md

* Update CHANGELOG.md

* update changelog

* Update CHANGELOG.md

Co-authored-by: John Olheiser <john+github@jolheiser.com>

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: John Olheiser <john+github@jolheiser.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>

* update changelog

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-08-23 10:02:16 +08:00
Enrico
502f7526d0
Fix typo in backup documentation (pgdump->pg_dump) (#20913)
This PR fixes a small typo in the backup documentation: `pgdump` command is wrong, the correct name for the backup software in PostgreSQL is `pg_dump`
2022-08-22 19:39:59 +01:00
Gusted
2e957e7ebb
Fix repository tests 2022-08-22 19:56:41 +02:00
Gusted
45324e169f
Add todo 2022-08-22 19:50:47 +02:00
Gusted
2373b4177a
Add paginition to Person's outbox 2022-08-22 19:37:04 +02:00
Gusted
5ad0387fbd
Add copyright to test file 2022-08-22 19:37:04 +02:00
73284dbf0b
Add authorize_interaction case for Tickets 2022-08-22 12:29:16 -05:00
c0efdedaa9
Fix typo for JSONUnmarshalerFn description comment 2022-08-22 12:10:02 -05:00
ee85f7d957
Use the Repository AttributedTo to get owner IRI 2022-08-22 12:09:26 -05:00
Gusted
f1e61af242
Fix another linting error 2022-08-22 19:02:01 +02:00
Gusted
1bc8e67e9c
Fix linting errors (errcheck) 2022-08-22 18:59:45 +02:00
Gusted
819e495dc0
Make gofmt happy 2022-08-22 18:48:17 +02:00
Gusted
b9dd4a2f5f
Make revive linter happy 2022-08-22 18:31:39 +02:00
Gusted
18809f811d
Make the frontend linter happy 2022-08-22 18:29:08 +02:00
zeripath
9d6a2034bc
Increase Content field size of gpg_key and public_key to MEDIUMTEXT (#20896)
Unfortunately some keys are too big to fix within the 65535 limit of TEXT on MySQL
this causes issues with these large keys.

Therefore increase these fields to MEDIUMTEXT.

Fix #20894

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-22 14:32:28 +01:00
CodeDoctor
aedfc923ad
Improve single repo action for issue and pull requests (#20730)
Related to #20650.

This will fix the behavior of the single repo action for pull requests and disables the button for other screens that don't have a single repo action currently.
2022-08-22 13:51:48 +01:00
Gusted
353a5331d5
Remove deprecated licenses (#20222) 2022-08-22 00:33:01 -04:00
techknowlogick
7854c447d9
update current stable version 2022-08-21 22:14:13 -04:00
Gary Wang
585e80a7fa [skip ci] Updated translations via Crowdin 2022-08-22 00:20:55 +00:00
Gary Wang
36dfe544f4
Fix mirror address setting not working (#20850)
This patch fixes the issue that the mirror address field is ignored from the repo setting form.
2022-08-21 19:23:50 +01:00
zeripath
943753f560
Support Proxy protocol (#12527)
This PR adds functionality to allow Gitea to sit behind an
HAProxy and HAProxy protocolled connections directly.

Fix #7508

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-21 19:20:43 +01:00
Gusted
0b4c166e8a
Fix SQL Query for SearchTeam (#20844)
- Currently the function takes in the `UserID` option, but isn't being
used within the SQL query. This patch fixes that by checking that only
teams are being returned that the user belongs to.

Fix #20829

Co-authored-by: delvh <dev.lh@web.de>
2022-08-21 17:24:05 +01:00
b3c065ce80
Refactor RepoInbox to use On functions instead of type assertions 2022-08-21 10:22:42 -05:00
zeripath
6d3181406d
Double check CloneURL is acceptable (#20869)
Some Migration Downloaders provide re-writing of CloneURLs that may point to
unallowed urls. Recheck after the CloneURL is rewritten.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-21 14:28:15 +01:00
wxiaoguang
6784a707d1
Fix graceful doc (#20883) 2022-08-21 02:50:27 -04:00
zeripath
11bae50484
Pad GPG Key ID with preceding zeroes (#20878) 2022-08-21 02:50:15 -04:00
27cda2fcd4
Implement JSONLoad, To, and On functions for ForgeFed types 2022-08-20 23:07:11 -05:00
JonRB
0ee96da052 [skip ci] Updated translations via Crowdin 2022-08-21 00:20:58 +00:00
JonRB
cb37c6ba5c
call builtinUnused() if internal SSH is disabled (#20877)
The graceful manager waits for 4 listeners to be created or to be told that they are not needed. If it is not told about them it will indefinitely and timeout. 

This leads to SVC hosts not being told of being in the readyState but on Unix would lead to the termination of the process.

There was an unfortunate regression in #20299 which missed this subtly and in the case whereby SSH is disabled the `builtinUnused()` is not called.

This PR adds a call to `builtinUnused()` when not using the builtin ssh to allow `createServerWaitGroup.Done()` to be called. 

In addition it was noted that the if/else clauses for timeout informing of the SVC host were in the wrong order. These have been swapped.

Fix #20609
2022-08-20 22:09:41 +01:00
Gusted
3d52edc7a4
Don't open new page for ext wiki on same repository (#20725)
- When the external wiki has been set to a file on the repository, don't
open the page on a tab.
- Resolves #20657
2022-08-20 15:47:04 +01:00
wxiaoguang
8cceee4084 [skip ci] Updated translations via Crowdin 2022-08-20 00:20:56 +00:00
6a6c6b3481
Merge remote-tracking branch 'upstream/main' 2022-08-19 17:46:12 -05:00
wxiaoguang
7258a124af
Fix the mode of custom dir to 0700 in docker-rootless (#20861) 2022-08-19 11:05:07 -04:00
wxiaoguang
2dd0b88a93
Fix UI mis-align for PR commit history (#20845) 2022-08-19 15:01:06 +08:00
Gusted
fad0e7a497
Fix create repository page's help text (#20810) 2022-08-18 22:13:08 -04:00
zeripath
fc4680ea71
In PushMirrorsIterate and MirrorsIterate if limit is negative do not set it (#20837) 2022-08-18 22:12:00 -04:00
zeripath
3aa5749d53
Disable doctor logging on panic (#20847)
* Disable doctor logging on panic

If permissions are incorrect for writing to the doctor log simply disable the log file
instead of panicing.

Related #20570

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update cmd/doctor.go

* Update cmd/doctor.go

Co-authored-by: delvh <dev.lh@web.de>

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-08-18 21:27:27 -04:00
zeripath
68f3aaee80
Remove calls to load Mirrors in user.Dashboard (#20855)
Whilst looking at #20840 I noticed that the Mirrors data doesn't appear
to be being used therefore we can remove this and in fact none of the
related code is used elsewhere so it can also be removed.

Related #20840
Related #20804

Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-18 20:53:31 -04:00
techknowlogick
3d12018a74
switch to node18 for snapcraft 2022-08-18 12:25:50 -04:00
zeripath
0724ca451e
Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839)
Some repositories do not have the PullRequest unit present in their configuration
and unfortunately the way that IsUserAllowedToUpdate currently works assumes
that this is an error instead of just returning false.

This PR simply swallows this error allowing the function to return false.

Fix #20621

Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-08-18 13:31:15 +03:00