Commit Graph

1987 Commits (0b86aa5d29478c2316f6f29eb5fdcfb074b459b6)

Author SHA1 Message Date
Unknwon 657ea2686f
auth: coding style and glitches fixes for GitHub login source (#5340) 2018-12-18 16:46:50 -05:00
haixunlu 311df9c521 auth: add new authentication source: GitHub, including GitHub Enterprise (#5340)
* Add new Authentication Source: GitHub, including GitHub Enterprise.

* Add vendor dependencies.
2018-12-18 15:49:30 -05:00
Unknwon ff93d9dbda
pkg/tool: improve SanitizePath (#5558) 2018-12-18 01:38:08 -05:00
Unknwon d74437af57
models/action: skip issue index parsing while using external issue tracker (#5551) 2018-12-17 22:52:58 -05:00
Unknwon f91cb9321e
api: add GetReferenceSHA (#5546) 2018-12-16 19:47:32 -05:00
Unknwon 8e2c3b315b
models: remove legacy support 2018-12-11 22:00:01 -05:00
Unknwon db3f0048d8
templates: rename template function Str2html -> Str2HTML 2018-12-10 22:23:56 -05:00
Unknwon d3d8284985
templates: sanitize special links in commit message (#5545)
Reported by @cezar97.
2018-12-10 22:21:42 -05:00
Unknwon f545faa06d
templates: make state changing routes to POST method (#5541)
- pkg/context: add ParamsUser to unify the injection process
2018-12-06 22:58:02 -05:00
Unknwon 458aadbb10
vendor: update github.com/go-macaron/session 2018-12-04 19:36:05 -05:00
Unknwon a7e8187a0d
pkg/context: expose port in import path for 'go-get=1' (#5305) 2018-12-03 13:24:31 -05:00
Unknwon 29c5be47ed
models/issue: fix panic when clear labels (#5445) 2018-12-02 17:51:24 -05:00
Unknwon e1b3a25008
api/repo: support edit repository issue tracker (gogs/go-gogs-client#94) 2018-12-02 12:55:05 -05:00
Unknwon ce13fbb98a
routes/api: allow get repository without login (#5475) 2018-12-01 21:40:19 -05:00
Samuel Cochran 084d9e0009 templates/user/dashboard: include 'org' query parameter in new mirror URL (#5534) 2018-11-29 07:21:16 -05:00
Unknwon 3db9b06a6e
api: fix critical CSRF vulnerabilities on API routes (#5355)
By explicitly requires token authentication.
2018-11-28 21:05:58 -05:00
Unknwon 1f9e21ebd5
templates/wiki: fix emoji rendering (#4869) 2018-11-26 07:02:21 -05:00
Federico Culloca 81effe674d templates/user/profile: added rel="me" to website link on user profile (#5485)
* Added rel="me" to website link on user profile

See issue #5008

* Added `nofollow` as per feedback
2018-11-12 20:49:30 -05:00
Unknwon b93079f1c1
vendor: update github.com/go-macaron/session (#5469)
Fix security flaw reported by c957861129d62331c5704d2f04d11e41.
2018-10-24 09:43:59 -04:00
Unknwon a1098384c0
vendor: update github.com/gogs/git-module 2018-10-23 07:02:13 -04:00
Unknwon 0d66b1cc1c
pkg/context: apply EscapePound at context level
Always escape template variable {{.Link}} variable and  redirect calls.

Relates to #5442
2018-09-28 23:56:45 -04:00
Unknwon 1843354d88
templates/repo/setting: fix missing EscapePound (#5442) 2018-09-28 23:32:00 -04:00
Unknwon bd7d1e2f16
routes: fix open redirect vulnerability (#5355)
Reported by @cezar97.
2018-09-28 23:19:29 -04:00
Unknwon aff0bbcc32
pkg/ssh: print actual error in panic (#5435) 2018-09-28 15:37:34 -04:00
Unknwon 3a4c981e31
locale: sync from Crowdin 2018-09-16 11:53:32 -04:00
Unknwon 520530dfcf
metrics: add initial Prometheus support (#4141) 2018-09-14 22:29:43 -04:00
Unknwon 1ec365de25
repo: trigger webhook when delete branch after merged pull request (#5331) 2018-09-14 20:04:31 -04:00
Unknwon 32479744f6
templates/admin/monitor: fix field error
[ci skip]
2018-09-13 23:30:59 -04:00
Unknwon b68de2330d
auth: support set default login source (#5274) 2018-09-13 14:06:04 -04:00
haixunlu 68a6579852 login_source: add default authentication switch (#5338)
* Add default Authentication Switch.

* adjust the code accroding to reviews

* #1. Remove redudant logic.
#2, Fix a bug in "Edit" panel.

* Remove unused logic

* Fix local authentication files are not flushed.

* refactor according to review.
2018-09-13 13:49:07 -04:00
Jakob Lykke Andersen 798798f7ab templates: hide dashboard org creation when not allowed (#5393)
The admin -> DISABLE_REGULAR_ORG_CREATION setting
hides organization creation in the header, but not
in the dashboard.
2018-09-11 14:10:09 -04:00
Unknwon f7b9f35ce1
locale: sync from Crowdin 2018-09-10 10:41:00 -04:00
Unknwon ac73d43444
repo_editor: able to trigger Git hooks (#4338) 2018-08-17 23:15:20 +08:00
Unknwon 844d69143f
pkg/markup: allow match SHA1 length 7-40 (#3321) 2018-08-17 20:02:43 +08:00
Unknwon de10d9be08
models: fix delete undesired release attachments when delete a comment (#4627)
Apparently, AfterDelete has ID=0
2018-08-16 20:17:19 +08:00
Unknwon 4c1a479a60
models: fix delete public keys ORM syntax (#5376) 2018-08-14 22:10:44 +08:00
cezar97 87b229d280 templates: add 'rel=noopener noreferrer' to <a> tags (#5319)
Signed-off-by: cezar97 <cezar97@protonmail.com>
2018-07-02 19:33:14 +08:00
Unknwon 2a86b3e31d
restore: reset milestone deadline_unix and closed_date_unix (#5264) 2018-06-27 22:08:24 +08:00
Unknwon f6bdefe3f3
public: minor fix for PR #5276 2018-06-26 21:16:29 +08:00
ususdei cd71077c6a pull request: able to add custom commit description (#5276)
* pull request merges now allow for custom commit messages

* allow i18n on commit_message label

* place label above textarea for commit message

* rename commit message for pull requests into commit description and pass to git separately
2018-06-26 20:49:46 +08:00
Unknwon f4f4edf276
vendor: update github.com/gogs/git-module 2018-06-25 19:58:40 +08:00
Unknwon 992ea5802a
locale: sync from Crowdin 2018-06-18 12:21:51 +08:00
Unknwon 376a629c9f
repo: add changes to repository avatar feature (#5221) 2018-06-17 22:18:41 +08:00
Sergey Dryabzhinsky 303fa37b60 repo: support avatars (#5221)
* First code for repository avatars

* Last code for repository avatars

- add new option for repo avatars location on filesystem
- add route catch in web
- add new fields to repo model
- add migration
- update settings handlers
- update repo header template

* Update locale messages

* Add repo avatars to home page

* Add repo avatars to organization right panel

* Show repo avatars in repo list

* Remove AvatarEamil field, remove Gravatar support, use generic locale messages

* Fix migration

* Fix seed and not used tool

* Revert public css changes, add them to less files

* Latest lessc (2.6.0) don't put result into file but output to stdout

So redirect output to file

* Simplify things:

- migration don't needed, and table changes too
- just upload file to repo avatar storage
- or generate random image

* Fix repo image seed - name not unique

* Get rid of not needed model fields

* Class value is enough, remove height attribute

* Don't generate random avatar for repository

- use html and semantic ui icons if no avatar found

* Update styles and templates for repo

- use repo icon as default avatar
- use globe icon for public repos
- add micro style for repo avatars at dashboard

* Remvoe redundant empty line

* Fix nl2br filter - must return string

* Fix css style for micro-repo-avatar in dashboard list

* Remove `|len`, works fine w/o it.

* Update after review 2:

- use static route for repository avatar
- format images settings block in settings

* Update after review 2:

- no random avatar for repo

* Update after review 2:

- no random avatar for repo 2
- update imports
- update UploadAvatar* functions

* Update after review 2:

- update templates

* Fix trace call

* Remove unused immport since we use static route for repo avatars.
2018-06-17 20:21:52 +08:00
Unknwon ef02414d7e
pkg/setting: ignore config inline comment by default 2018-06-17 09:10:18 +08:00
Unknwon 86a27cf16d
modes/repo: syntax fix for PR #5234 2018-06-16 16:48:47 +08:00
Unknwon e5ddbcab7d
routes/repo/http: fix wrong format type 2018-06-13 21:58:46 +08:00
Unknwon dfd494c113
repo: minor improve for PR #5219 and support UTF-8 byte count 2018-06-11 21:06:24 +08:00
Sergey Dryabzhinsky 57897cc8c2 repo: update repository description field to contain more than 256 symbols (#5219)
* Update repository description field to contain more than 256 symbols

- update repository model - description field now is `TEXT` and limited by 4000 symbols
- new migration
- add description to html forms - repo creation and repo settings
- add translation for description

* Update for description field, new features

- add autosize (height) for description textarea, new plugin
- set max description length to 512 symbols
- update locales

* Fix migration - typo in var

* Update repo description behaviour

- add textarea autosize for /repo/create
- add symbols counter under description testarea (create/edit)

* Fix function definition - it a var

* Revert ru-RU locale

* Update by review

- Use type `varchar(512)` in migration
- Remove unused files from autosize plugin

* Fix migration - new project paths

* Fixes after review 2

- copyright year
- format includes
- use switch instead of multi-if

* Remove unused `default:` option.
2018-06-11 20:34:26 +08:00
Unknwon b538c5345e
restore: reset original created_unix after insert (#5264) 2018-06-09 17:21:58 +08:00
Unknwon 078549518d
vendor: update github.com/gogs/git-module 2018-06-09 10:00:45 +08:00
Unknwon c08aab90ec
models/mirror: shot push webhook after synced commits (#4528) 2018-06-03 20:32:44 +08:00
Unknwon 0376e59520
pkg/setting: fix '[git] GC_ARGS' is not loaded 2018-06-03 16:02:17 +08:00
Unknwon e25fe22f9d
pkg/template: fix NewLine2br return type to string 2018-06-02 08:15:56 +08:00
Unknwon bef7f6745c
templates/repo/settings: fix mirror setting error 2018-05-30 21:32:40 +08:00
Unknwon 775919c129
mirror: show sync feeds on dashboard (#2017) 2018-05-30 21:26:03 +08:00
Sergey Dryabzhinsky b5a1daa756 template: simple html filter for repository description (#5242)
* Add markdown renderer function to templates, use it for description in repo template

* Fix function call

* Define function Md2html in template namespace

* Change filter from Md2html to nl2br

* Change filter name to NewLine2br as suggested

* Update description output:

- just replace `\n` by `<br>`
- sanitize html after replace
2018-05-29 06:42:27 +08:00
Unknwon 01ccc2cc96
security: prevent same passcode from being reused
Reported by @cezar97.
2018-05-21 14:24:06 +08:00
Madzahttr cd093a07a3 templates/mail/auth: update copyright year (#5224)
* Update activate.tmpl

* Update activate_email.tmpl

* Update register_notify.tmpl

* Update reset_passwd.tmpl
2018-05-13 05:25:51 -04:00
Sergey Dryabzhinsky 7e450542d9 templates/repo: use correct Semantic UI icon styles to fix star and watch icons (#5218)
* Update font-awesome to 4.7.0

* Fix font-awesome styles overrided by semantic

* Revert back

* Revert back 2

* Just use right `semantic` icon styles
2018-05-10 04:58:04 -04:00
Michael Li 45545e897c templates/user/dashboard: make page more concise for user's activity/issues/PR information (#5209) 2018-05-08 14:43:23 -04:00
Unknwon e3ce295215
public/css: generate CSS for PR #5169 2018-04-26 17:05:30 -04:00
Unknwon 15f9a83618
templates/repo: escape branch name (#4601) 2018-04-25 22:35:50 -04:00
Unknwon 9127001f11
pkg/setting: support Discord logger 2018-04-25 22:13:01 -04:00
rokuu c68fc4f31a templates: fixes broken UI under supported resolution (1024x768) #5179 (#5182)
* Update view_list.tmpl

* Update commits_table.tmpl

* Update dashboard.tmpl

* Update list.tmpl

* Update list.tmpl

* Update list.tmpl

* Update list.tmpl

* Update notice.tmpl

* Update monitor.tmpl

* Update view_file.tmpl

* Update diff_preview.tmpl

* Update box.tmpl
2018-04-24 09:54:22 -04:00
rokuu 9387b79b98 templates: delete legacy file (#5180) 2018-04-19 01:27:59 -04:00
Unknwon 5c2de3a9ea
pkg/template: fix Gravatar URLs are badly generated (#5157) 2018-04-18 19:40:35 -04:00
Unknwon f89d948c06
templates/repo/issue: rework escape delete branch link after merged pull request (#4601) 2018-04-16 23:08:09 -04:00
Unknwon 45a0988833
templates/repo/issue: escape delete branch link after merged pull request (#4601) 2018-04-16 23:02:20 -04:00
Nicolas Ettlin afbb31c05e MISC: fix Mac OS X → macOS (#5168) 2018-04-16 19:29:11 -04:00
Unknwon e6af6487e1
locale: sync from Crowdin
Add Vietnamese
2018-04-16 17:48:23 -04:00
Unknwon cb47595f13
Bump version 2018-04-12 10:57:43 -04:00
Unknwon c59704a24b
public: update Semantic UI 2.2.13 -> 2.3.1 2018-04-12 09:57:27 -04:00
Unknwon f2ecfdc96a
auth: support authentication source config file (#3142) 2018-04-12 09:55:58 -04:00
Unknwon 717d409b72
templates/admin/auth/list: rename list title 2018-04-11 19:39:17 -04:00
Unknwon 6e207c823e
templates/admin/auth/list: move "new" button to table foot 2018-04-11 19:38:52 -04:00
Unknwon 8b66c433c5
models/pull: fix error on merge pull requests to non-default branch (#5138) 2018-04-09 07:26:38 -04:00
Unknwon 55f148f499
template: delete legacy file 2018-04-02 00:03:07 -04:00
Unknwon 34bd04f925
MISC: fix typo and grammar
Reference: 932490d7f1 (commitcomment-28344918)
2018-03-30 04:40:13 -04:00
Unknwon 17d789a785
pkg/mailer: support custom mail subject prefix (#4524) 2018-03-30 03:52:23 -04:00
Unknwon 63a263f542
templates/admin/config: show SSH.StartBuiltinServer 2018-03-30 01:42:35 -04:00
Unknwon 932490d7f1
conf: add option to rewrite authorized_keys file at start (#4435)
Added config option '[server] REWRITE_AUTHORIZED_KEYS_AT_START'.
2018-03-30 01:32:18 -04:00
Unknwon c17a6ff533
templates/repo: show quick guide to people with write permission (#4646)
Used to only show people who has admin permission.
2018-03-29 05:57:11 -04:00
Unknwon 75555585e8
models/pull: fix rebase merging no effect (#5051) 2018-03-21 19:11:36 -04:00
Unknwon 28e0003a9a
templates/repo/branches: escape pound in branch name (#4874) 2018-03-20 20:11:02 -04:00
Jorge Maldonado Ventura 2818ce4632 templates: make dropdowns menus work when JavaScript is disabled (#4780)
* Make dropdowns menus work when JavaScript is disabled

* Update head.tmpl

* Update head.tmpl
2018-03-20 20:04:34 -04:00
Unknwon 52ee796d6d
repo_branch: fix SQL builder (#5054) 2018-03-20 19:06:13 -04:00
Unknwon ba0a78da2a
templates/repo/branches: escape pound in branch name (#4874) 2018-03-12 15:27:27 -04:00
Unknwon d7280f82ac
locale: sync from Crowdin 2018-03-12 09:23:29 -04:00
Unknwon 86d249eb16
migrations: remove unused function and fix compile error 2018-03-09 00:33:40 -05:00
Unknwon 40eb652cfa
public/plugins: update notebookjs to 0.3.0 (#5077) 2018-03-08 02:12:04 -05:00
Ruben Vermeersch f4e4ea1374 public: update notebookjs to 0.3.0 (#5084)
Fixes #5077
2018-03-08 02:06:57 -05:00
James 199d67581a templates/user/dashboard/issues: show labels to each issue (#4976)
* add issue labels

* remove hyperlink from issue label

* wrap labels in right aligned span

* put issues with div

put the issue labels within a div so they don't interfere with the number of comments
2018-03-07 06:39:38 -05:00
Unknwon 49bd893a77
bindata: update changes from pull requests 2018-03-06 17:22:27 -05:00
Andres D 8729a60c1d templates/user/auth/login: disable password autocomplete (#5068)
As gogs can be linked with PAM it is recommended to disable the autocomplete on the password input.
2018-03-06 17:20:38 -05:00
Larry Li f9c706e31b templates/user/settings: fix delete email button (#4998) 2018-03-06 17:03:43 -05:00
Sanxing Chen 68d22e78bf templates: update year in footer (#4966)
Happy new year!
2018-03-06 16:47:35 -05:00
kaajavi ca874ba8c7 templates/repo: fix wrong branch url in branches view (#4902) 2018-03-06 16:35:24 -05:00
Unknwon b9e4a052b8
vendor: update gopkg.in/macaron.v1 2018-03-06 01:25:55 -05:00
Unknwon 17d2a9c435
vendor: update github.com/gogits/git-module 2018-03-02 02:17:04 -05:00