You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
5.6 KiB

Improve listing performance by using go-git (#6478) * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
5 years ago
Add a storage layer for attachments (#11387) * Add a storage layer for attachments * Fix some bug * fix test * Fix copyright head and lint * Fix bug * Add setting for minio and flags for migrate-storage * Add documents * fix lint * Add test for minio store type on attachments * fix test * fix test * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add warning when storage migrated successfully * Fix drone * fix test * rebase * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * remove log on xorm * Fi download bug * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * Add URL function to serve attachments directly from S3/Minio * Add ability to enable/disable redirection in attachment configuration * Fix typo * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * don't change unrelated files * Fix lint * Fix build * update go.mod and go.sum * Use github.com/minio/minio-go/v6 * Remove unused function * Upgrade minio to v7 and some other improvements * fix lint * Fix go mod Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Tyler <tystuyfzand@gmail.com>
4 years ago
Add single sign-on support via SSPI on Windows (#8463) * Add single sign-on support via SSPI on Windows * Ensure plugins implement interface * Ensure plugins implement interface * Move functions used only by the SSPI auth method to sspi_windows.go * Field SSPISeparatorReplacement of AuthenticationForm should not be required via binding, as binding will insist the field is non-empty even if another login type is selected * Fix breaking of oauth authentication on download links. Do not create new session with SSPI authentication on download links. * Update documentation for the new 'SPNEGO with SSPI' login source * Mention in documentation that ROOT_URL should contain the FQDN of the server * Make sure that Contexter is not checking for active login sources when the ORM engine is not initialized (eg. when installing) * Always initialize and free SSO methods, even if they are not enabled, as a method can be activated while the app is running (from Authentication sources) * Add option in SSPIConfig for removing of domains from logon names * Update helper text for StripDomainNames option * Make sure handleSignIn() is called after a new user object is created by SSPI auth method * Remove default value from text of form field helper Co-Authored-By: Lauris BH <lauris@nix.lv> * Remove default value from text of form field helper Co-Authored-By: Lauris BH <lauris@nix.lv> * Remove default value from text of form field helper Co-Authored-By: Lauris BH <lauris@nix.lv> * Only make a query to the DB to check if SSPI is enabled on handlers that need that information for templates * Remove code duplication * Log errors in ActiveLoginSources Co-Authored-By: Lauris BH <lauris@nix.lv> * Revert suffix of randomly generated E-mails for Reverse proxy authentication Co-Authored-By: Lauris BH <lauris@nix.lv> * Revert unneeded white-space change in template Co-Authored-By: Lauris BH <lauris@nix.lv> * Add copyright comments at the top of new files * Use loopback name for randomly generated emails * Add locale tag for the SSPISeparatorReplacement field with proper casing * Revert casing of SSPISeparatorReplacement field in locale file, moving it up, next to other form fields * Update docs/content/doc/features/authentication.en-us.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Remove Priority() method and define the order in which SSO auth methods should be executed in one place * Log authenticated username only if it's not empty * Rephrase helper text for automatic creation of users * Return error if more than one active SSPI auth source is found * Change newUser() function to return error, letting caller log/handle the error * Move isPublicResource, isPublicPage and handleSignIn functions outside SSPI auth method to allow other SSO methods to reuse them if needed * Refactor initialization of the list containing SSO auth methods * Validate SSPI settings on POST * Change SSPI to only perform authentication on its own login page, API paths and download links. Leave Toggle middleware to redirect non authenticated users to login page * Make 'Default language' in SSPI config empty, unless changed by admin * Show error if admin tries to add a second authentication source of type SSPI * Simplify declaration of global variable * Rebuild gitgraph.js on Linux * Make sure config values containing only whitespace are not accepted
5 years ago
Add a storage layer for attachments (#11387) * Add a storage layer for attachments * Fix some bug * fix test * Fix copyright head and lint * Fix bug * Add setting for minio and flags for migrate-storage * Add documents * fix lint * Add test for minio store type on attachments * fix test * fix test * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add warning when storage migrated successfully * Fix drone * fix test * rebase * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * remove log on xorm * Fi download bug * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * Add URL function to serve attachments directly from S3/Minio * Add ability to enable/disable redirection in attachment configuration * Fix typo * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * don't change unrelated files * Fix lint * Fix build * update go.mod and go.sum * Use github.com/minio/minio-go/v6 * Remove unused function * Upgrade minio to v7 and some other improvements * fix lint * Fix go mod Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Tyler <tystuyfzand@gmail.com>
4 years ago
  1. module code.gitea.io/gitea
  2. go 1.14
  3. require (
  4. code.gitea.io/gitea-vet v0.2.1
  5. gitea.com/lunny/levelqueue v0.3.0
  6. gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b
  7. gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76
  8. gitea.com/macaron/captcha v0.0.0-20190822015246-daa973478bae
  9. gitea.com/macaron/cors v0.0.0-20190826180238-95aec09ea8b4
  10. gitea.com/macaron/csrf v0.0.0-20190822024205-3dc5a4474439
  11. gitea.com/macaron/gzip v0.0.0-20200827120000-efa5e8477cf5
  12. gitea.com/macaron/i18n v0.0.0-20190822004228-474e714e2223
  13. gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a
  14. gitea.com/macaron/macaron v1.5.0
  15. gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e
  16. gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7
  17. github.com/BurntSushi/toml v0.3.1
  18. github.com/PuerkitoBio/goquery v1.5.1
  19. github.com/alecthomas/chroma v0.8.0
  20. github.com/blevesearch/bleve v1.0.10
  21. github.com/couchbase/gomemcached v0.0.0-20191004160342-7b5da2ec40b2 // indirect
  22. github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d // indirect
  23. github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
  24. github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 // indirect
  25. github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc
  26. github.com/dgrijalva/jwt-go v3.2.0+incompatible
  27. github.com/dlclark/regexp2 v1.2.1 // indirect
  28. github.com/dustin/go-humanize v1.0.0
  29. github.com/editorconfig/editorconfig-core-go/v2 v2.1.1
  30. github.com/emirpasic/gods v1.12.0
  31. github.com/ethantkoenig/rupture v0.0.0-20180203182544-0a76f03a811a
  32. github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect
  33. github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
  34. github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
  35. github.com/gliderlabs/ssh v0.2.2
  36. github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a // indirect
  37. github.com/go-enry/go-enry/v2 v2.5.2
  38. github.com/go-git/go-billy/v5 v5.0.0
  39. github.com/go-git/go-git/v5 v5.1.0
  40. github.com/go-redis/redis v6.15.2+incompatible
  41. github.com/go-sql-driver/mysql v1.5.0
  42. github.com/go-swagger/go-swagger v0.25.0
  43. github.com/go-testfixtures/testfixtures/v3 v3.4.0
  44. github.com/gobwas/glob v0.2.3
  45. github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28
  46. github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
  47. github.com/google/go-github/v32 v32.1.0
  48. github.com/google/uuid v1.1.1
  49. github.com/gorilla/context v1.1.1
  50. github.com/hashicorp/go-retryablehttp v0.6.7 // indirect
  51. github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000
  52. github.com/huandu/xstrings v1.3.0
  53. github.com/issue9/assert v1.3.2 // indirect
  54. github.com/issue9/identicon v1.0.1
  55. github.com/jaytaylor/html2text v0.0.0-20160923191438-8fb95d837f7d
  56. github.com/jmhodges/levigo v1.0.0 // indirect
  57. github.com/kballard/go-shellquote v0.0.0-20170619183022-cd60e84ee657
  58. github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
  59. github.com/klauspost/compress v1.10.11
  60. github.com/lafriks/xormstore v1.3.2
  61. github.com/lib/pq v1.7.0
  62. github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
  63. github.com/markbates/goth v1.61.2
  64. github.com/mattn/go-isatty v0.0.12
  65. github.com/mattn/go-sqlite3 v1.14.0
  66. github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81
  67. github.com/mgechev/revive v1.0.2
  68. github.com/mholt/archiver/v3 v3.3.0
  69. github.com/microcosm-cc/bluemonday v1.0.3-0.20191119130333-0a75d7616912
  70. github.com/minio/minio-go/v7 v7.0.4
  71. github.com/mitchellh/go-homedir v1.1.0
  72. github.com/msteinert/pam v0.0.0-20151204160544-02ccfbfaf0cc
  73. github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
  74. github.com/niklasfasching/go-org v1.3.2
  75. github.com/oliamb/cutter v0.2.2
  76. github.com/olivere/elastic/v7 v7.0.9
  77. github.com/pkg/errors v0.9.1
  78. github.com/pquerna/otp v1.2.0
  79. github.com/prometheus/client_golang v1.1.0
  80. github.com/prometheus/procfs v0.0.4 // indirect
  81. github.com/quasoft/websspi v1.0.0
  82. github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 // indirect
  83. github.com/sergi/go-diff v1.1.0
  84. github.com/shurcooL/httpfs v0.0.0-20190527155220-6a4d4a70508b // indirect
  85. github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
  86. github.com/stretchr/testify v1.6.1
  87. github.com/tecbot/gorocksdb v0.0.0-20181010114359-8752a9433481 // indirect
  88. github.com/tinylib/msgp v1.1.2 // indirect
  89. github.com/tstranex/u2f v1.0.0
  90. github.com/unknwon/com v1.0.1
  91. github.com/unknwon/i18n v0.0.0-20190805065654-5c6446a380b6
  92. github.com/unknwon/paginater v0.0.0-20151104151617-7748a72e0141
  93. github.com/urfave/cli v1.20.0
  94. github.com/xanzy/go-gitlab v0.37.0
  95. github.com/yohcop/openid-go v1.0.0
  96. github.com/yuin/goldmark v1.2.1
  97. github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
  98. github.com/yuin/goldmark-meta v0.0.0-20191126180153-f0638e958b60
  99. go.jolheiser.com/pwn v0.0.3
  100. golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
  101. golang.org/x/net v0.0.0-20200904194848-62affa334b73
  102. golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
  103. golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae
  104. golang.org/x/text v0.3.3
  105. golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
  106. golang.org/x/tools v0.0.0-20200825202427-b303f430e36d
  107. gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
  108. gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
  109. gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
  110. gopkg.in/ini.v1 v1.60.2
  111. gopkg.in/ldap.v3 v3.0.2
  112. gopkg.in/yaml.v2 v2.3.0
  113. mvdan.cc/xurls/v2 v2.1.0
  114. strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
  115. xorm.io/builder v0.3.7
  116. xorm.io/xorm v1.0.5
  117. )
  118. replace github.com/hashicorp/go-version => github.com/6543/go-version v1.2.3