[PR #1507] [MERGED] Better URL validation #15934

Closed
opened 2025-11-02 11:58:18 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1507
Author: @lafriks
Created: 4/17/2017
Status: Merged
Merged: 4/19/2017
Merged by: @appleboy

Base: masterHead: url_validation


📝 Commits (10+)

  • de02ea7 Add correct git branch name validation
  • 1a049bf Change git refname validation error constant name
  • 351c2ad Implement URL validation based on GoLang url.Parse method
  • f6bba6a Backward compatibility with older Go compiler
  • d23c657 Add git reference name validation unit tests
  • 5fa98bb Remove unused variable in unit test
  • e3ecbeb Implement URL validation based on GoLang url.Parse method
  • 0925765 Backward compatibility with older Go compiler
  • f0724b1 Merge branch 'url_validation' of github.com:lafriks/gitea into url_validation
  • a550657 Add url validation unit tests

📊 Changes

11 files changed (+432 additions, -9 deletions)

View changed files

📝 cmd/web.go (+2 -0)
📝 modules/auth/admin.go (+1 -1)
📝 modules/auth/auth.go (+3 -0)
📝 modules/auth/org.go (+1 -1)
📝 modules/auth/repo_form.go (+6 -6)
📝 modules/auth/user_form.go (+1 -1)
modules/validation/binding.go (+102 -0)
modules/validation/binding_test.go (+62 -0)
modules/validation/refname_test.go (+142 -0)
modules/validation/validurl_test.go (+111 -0)
📝 options/locale/locale_en-US.ini (+1 -0)

📄 Description

Depends on pull request #1503

Current Url validation allows invalid urls and does not accept some valid


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1507 **Author:** [@lafriks](https://github.com/lafriks) **Created:** 4/17/2017 **Status:** ✅ Merged **Merged:** 4/19/2017 **Merged by:** [@appleboy](https://github.com/appleboy) **Base:** `master` ← **Head:** `url_validation` --- ### 📝 Commits (10+) - [`de02ea7`](https://github.com/go-gitea/gitea/commit/de02ea74c9cb3f19f8968e9d82749277c3db6562) Add correct git branch name validation - [`1a049bf`](https://github.com/go-gitea/gitea/commit/1a049bf715cabccdf30b64234fcae6115c6f4441) Change git refname validation error constant name - [`351c2ad`](https://github.com/go-gitea/gitea/commit/351c2add81d2446d6efd20074bb38cb820ec4287) Implement URL validation based on GoLang url.Parse method - [`f6bba6a`](https://github.com/go-gitea/gitea/commit/f6bba6acf87a011330db846acd6d155876830860) Backward compatibility with older Go compiler - [`d23c657`](https://github.com/go-gitea/gitea/commit/d23c65793902408434cf37c131afb75f4ffce8d6) Add git reference name validation unit tests - [`5fa98bb`](https://github.com/go-gitea/gitea/commit/5fa98bb016d427b05281dccf92418bc39b4ac912) Remove unused variable in unit test - [`e3ecbeb`](https://github.com/go-gitea/gitea/commit/e3ecbeb415d11542c39ec1db0615b3837dd88a34) Implement URL validation based on GoLang url.Parse method - [`0925765`](https://github.com/go-gitea/gitea/commit/0925765b4d8abf9f7e050500ebbcd4c27899a3ff) Backward compatibility with older Go compiler - [`f0724b1`](https://github.com/go-gitea/gitea/commit/f0724b10aaa8c04acc90adde3f2d7f5b8dda51c4) Merge branch 'url_validation' of github.com:lafriks/gitea into url_validation - [`a550657`](https://github.com/go-gitea/gitea/commit/a550657c8a986cb8f34e8aab142fc8a94a5cc5d9) Add url validation unit tests ### 📊 Changes **11 files changed** (+432 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `cmd/web.go` (+2 -0) 📝 `modules/auth/admin.go` (+1 -1) 📝 `modules/auth/auth.go` (+3 -0) 📝 `modules/auth/org.go` (+1 -1) 📝 `modules/auth/repo_form.go` (+6 -6) 📝 `modules/auth/user_form.go` (+1 -1) ➕ `modules/validation/binding.go` (+102 -0) ➕ `modules/validation/binding_test.go` (+62 -0) ➕ `modules/validation/refname_test.go` (+142 -0) ➕ `modules/validation/validurl_test.go` (+111 -0) 📝 `options/locale/locale_en-US.ini` (+1 -0) </details> ### 📄 Description Depends on pull request #1503 Current Url validation allows invalid urls and does not accept some valid --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:58:18 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15934