Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-04-05Merge branch 'refactor/specialized-require' into 'master'Jaime Martinez
test: replace require.Equal with specialized assertions See merge request gitlab-org/gitlab-pages!685
2022-04-01Merge branch 'security-validate-session-host' into 'master'Vladimir Shushlin
fix: validate that session was issued on the same host See merge request gitlab-org/security/gitlab-pages!28
2022-03-24fix: validate that session was issued on the same hostVladimir Shushlin
Currently, sessions are valid across all domains. And our auth tokens are also valid for all pages projects user has access to. This means that cookie from one website can be reused on the another. Attackers can steal cookies in many different ways. The easiest way would be to setup a validated custom domain, then proxy all requests to pages server, but log the cookies. Once you have a cookie for attackers domain, you can reuse it on any other pages domain the target user has access to. This commit saves current domain in the session and validates it when reading the session. Changelog: security
2022-03-14update go-proxyproto and fix testsvtak
2022-02-24test: replace require.Equal with specialized assertionsfeistel
2022-02-22Merge branch 'reject-tls-2' into 'master'Vladimir Shushlin
feat: add rate limits on the TLS connection level See merge request gitlab-org/gitlab-pages!700
2022-02-22feat: Always apply TLS limits even without ServerNameVladimir Shushlin
2022-02-21feat: Add TLS rate limitsVladimir Shushlin
Changelog: added
2022-02-21Merge branch 'set-timeout-in-tests' into 'master'Jaime Martinez
refactor: Always set request timeout in tests See merge request gitlab-org/gitlab-pages!699
2022-02-18refactor: Always set request timeout in testsVladimir Shushlin
2022-02-16reset: go back to initial commit.yigithankardas
2022-02-02lint: fix linter issuesfeistel
2022-01-25Merge branch 'refactor/test-tmp' into 'master'Vladimir Shushlin
test: replace tmpdir workaround with native T tmp See merge request gitlab-org/gitlab-pages!598
2022-01-25Merge branch 'cleanup/gitlab-server-stub' into 'master'Alessio Caiazza
test: cleanup gitlab server stub and stubOpts See merge request gitlab-org/gitlab-pages!652
2022-01-24test: replace tmpdir workaround with native T tmpfeistel
2022-01-24lint: fix gci issuesfeistel
2022-01-20feat: implement graceful shutdownfeistel
Changelog: added
2022-01-12Merge branch '630-add-rate-limiting-per-domain-name' into 'master'Jaime Martinez
Add rate limiting per domain name See merge request gitlab-org/gitlab-pages!635
2022-01-11feat: add domain rate-limiterVladimir Shushlin
Changelog: added
2021-12-24feat: enable Etag cachingVladimir Shushlin
Changelog: added
2021-12-22test: cleanup gitlab server stub and stubOptsfeistel
2021-12-21fix: wait for process to exit in acceptance testsVladimir Shushlin
2021-12-16feat: implement ETag support for zip servingfeistel
Changelog: added
2021-12-14refactor: extract common logic for env feature flagsVladimir Shushlin
2021-12-14Merge branch 'remove/ff-enable-redirects' into 'master'Vladimir Shushlin
refactor: remove FF_ENABLE_REDIRECTS feature flag Closes #618 See merge request gitlab-org/gitlab-pages!582
2021-12-14Merge branch 'fix/sha-lookups' into 'master'Jaime Martinez
test: add sha256 to mocked lookups and fix tests See merge request gitlab-org/gitlab-pages!634
2021-12-13refactor: abstract ratelimiter packageVladimir Shushlin
We want to add domain-based ratelimiter. The logic will be identical, but we'll use host instead of IP address.
2021-12-08test: add slow req acceptance testJaime Martinez
2021-12-08test: add sha256 to mocked lookups and fix testsfeistel
2021-12-07refactor: enable unparam in .golangci.ymlVladimir Shushlin
and fix offences
2021-11-17Merge branch 'refactor/run-pages-test' into 'master'Jaime Martinez
test: refactor RunPagesProcess function to take functional arguments Closes #79 See merge request gitlab-org/gitlab-pages!607
2021-11-16feat: handle extra headers when serving from compressed zip archivefeistel
Related to https://gitlab.com/gitlab-org/gitlab-pages/-/issues/466 Changelog: added
2021-11-11fix: reject requests with very long URIsVladimir Shushlin
Some parts of the application may be vulnerable to very long URIs being passed. E.g. Auth will try to save URI to session cookie, and it will fails, which will result in 500 error Changelog: fixed
2021-11-02test: refactor RunPagesProcess function to take functional argumentsfeistel
2021-10-29test: use GetPageFromListenerWithHeaders across testsfeistel
remove GetCompressedPageFromListener, GetPageFromListenerWithCookie and GetProxiedPageFromListener
2021-10-14refactor: remove WithProxied settingJaime Martinez
2021-10-14test: rate limiter acceptance testsJaime Martinez
test: rate limit with all listener types
2021-10-14feat: add source IP ratelimiter middlewareJaime Martinez
It gets the source IP from `r.RemoteAddr` or from the `X-Forwarded-For` header for proxied requests (when `--listen-proxy` is enabled). The first iteration will only report logs and metrics when an IP is being rate limited. The rate limiter uses a Token Bucket approach using golang.org/x/time/rate, which can be configured with the newly added flags `rate-limit-source-ip` and `rate-limit-source-ip-burst`. To enable the rate limiter, set `rate-limit-source-ip` to value > 1, which is the number of requests per second to allow. It is enabled by default in "dry-run" mode so requests won't be dropped until the environment variable `FF_ENABLE_RATE_LIMITER` is set to `"true"`. See metrics.go for the newly added metrics. Changelog: added
2021-10-08Merge branch 'remove/root' into 'master'Jaime Martinez
Remove gitlab-pages daemon Closes #114 and #133 See merge request gitlab-org/gitlab-pages!542
2021-10-07test: remove support for daemonize testsfeistel
2021-10-07refactor: stop running gitlab-pages as rootfeistel
We have now disabled chroot by default since %14.1, and recently removed support for disk-based configuration coming in %14.3. And we've also removed the chroot completely from Pages. Since nginx can do TCP proxying and there's no need to use privileged ports, Pages has been confirmed to run as non-root in k8s environment without any issues. This MR removes support for the gitlab-pages daemon completely. Changelog: removed
2021-09-16refactor: remove FF_ENABLE_REDIRECTS feature flagfeistel
2021-09-09refactor: avoid os.Is.. in favor of errors.Isfeistel
2021-09-09refactor: move away from ioutil (deprecated)feistel
2021-09-07test: improve artifact acceptance testfeistel
2021-08-26refactor: remove chroot/jail logicfeistel
Changelog: removed
2021-08-26test: remove TestDomainsSource acceptance testfeistel
2021-08-26refactor: remove metrics for disk sourcefeistel
2021-08-26Merge branch 'remove/disk-source' into 'master'Jaime Martinez
refactor: remove support for disk configuration source Closes #103, #158, #68, and #382 See merge request gitlab-org/gitlab-pages!541
2021-08-20Splat and placeholder support in _redirectsNathan Friend
This commit adds support for Netlify-style splats (*) and :placeholders in the _redirects file. Changelog: added