mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37:20 +00:00
Add migration to sanitize repository original_url (#9423)
* Add migration to sanitize repository original_url During a large code move in #6200 the OriginalURL field was accidentially changed to be populated with the CloneAddr field which will contain the username and/or password provided during a migration. This behavior was fixed in previous PR #9097 and this migration will remove any authentication details that were stored in the database between those two. * use net/url to rebuild URL instead of strings.Replace * Update models/migrations/migrations.go * changes per lunny * make fmt
This commit is contained in:
@ -282,6 +282,8 @@ var migrations = []Migration{
|
||||
NewMigration("remove release attachments which repository deleted", removeAttachmentMissedRepo),
|
||||
// v113 -> v114
|
||||
NewMigration("new feature: change target branch of pull requests", featureChangeTargetBranch),
|
||||
// v114 -> v115
|
||||
NewMigration("Remove authentication credentials from stored URL", sanitizeOriginalURL),
|
||||
}
|
||||
|
||||
// Migrate database to current version
|
||||
|
Reference in New Issue
Block a user