mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 08:02:36 +09:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			v1.20.1
			...
			v1.14.0-rc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ed60fe0986 | ||
| 
						 | 
					29e0d62790 | ||
| 
						 | 
					7b464fa67b | 
@@ -4,13 +4,12 @@ This changelog goes through all the changes that have been made in each release
 | 
				
			|||||||
without substantial changes to our git log; to see the highlights of what has
 | 
					without substantial changes to our git log; to see the highlights of what has
 | 
				
			||||||
been added to each release, please refer to the [blog](https://blog.gitea.io).
 | 
					been added to each release, please refer to the [blog](https://blog.gitea.io).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [1.14.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.14.0) - 2021-03-19
 | 
					## [1.14.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.14.0-rc1) - 2021-03-20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* SECURITY
 | 
					* SECURITY
 | 
				
			||||||
  * Respect approved email domain list for externally validated user registration (#15014)
 | 
					  * Respect approved email domain list for externally validated user registration (#15014)
 | 
				
			||||||
  * Add reverse proxy configuration support for remote IP address detection (#14959)
 | 
					  * Add reverse proxy configuration support for remote IP address detection (#14959)
 | 
				
			||||||
  * Ensure validation occurs on clone addresses too (#14994)
 | 
					  * Ensure validation occurs on clone addresses too (#14994)
 | 
				
			||||||
  * Fix several render issues highlighted during fuzzing (#14986)
 | 
					 | 
				
			||||||
* BREAKING
 | 
					* BREAKING
 | 
				
			||||||
  * Restore Access.log following migration to Chi framework (Stops access logging of /api/internal routes) (#14475)
 | 
					  * Restore Access.log following migration to Chi framework (Stops access logging of /api/internal routes) (#14475)
 | 
				
			||||||
  * Migrate from Macaron to Chi framework (#14293)
 | 
					  * Migrate from Macaron to Chi framework (#14293)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@@ -128,7 +128,7 @@ require (
 | 
				
			|||||||
	github.com/xanzy/go-gitlab v0.44.0
 | 
						github.com/xanzy/go-gitlab v0.44.0
 | 
				
			||||||
	github.com/xanzy/ssh-agent v0.3.0 // indirect
 | 
						github.com/xanzy/ssh-agent v0.3.0 // indirect
 | 
				
			||||||
	github.com/yohcop/openid-go v1.0.0
 | 
						github.com/yohcop/openid-go v1.0.0
 | 
				
			||||||
	github.com/yuin/goldmark v1.3.2
 | 
						github.com/yuin/goldmark v1.3.3
 | 
				
			||||||
	github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
 | 
						github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
 | 
				
			||||||
	github.com/yuin/goldmark-meta v1.0.0
 | 
						github.com/yuin/goldmark-meta v1.0.0
 | 
				
			||||||
	go.jolheiser.com/hcaptcha v0.0.4
 | 
						go.jolheiser.com/hcaptcha v0.0.4
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							@@ -1145,8 +1145,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
 | 
				
			|||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
					github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
				
			||||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
					github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
				
			||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
					github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 | 
				
			||||||
github.com/yuin/goldmark v1.3.2 h1:YjHC5TgyMmHpicTgEqDN0Q96Xo8K6tLXPnmNOHXCgs0=
 | 
					github.com/yuin/goldmark v1.3.3 h1:37BdQwPx8VOSic8eDSWee6QL9mRpZRm9VJp/QugNrW0=
 | 
				
			||||||
github.com/yuin/goldmark v1.3.2/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 | 
					github.com/yuin/goldmark v1.3.3/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 | 
				
			||||||
github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691 h1:VWSxtAiQNh3zgHJpdpkpVYjTPqRE3P6UZCOPa1nRDio=
 | 
					github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691 h1:VWSxtAiQNh3zgHJpdpkpVYjTPqRE3P6UZCOPa1nRDio=
 | 
				
			||||||
github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691/go.mod h1:YLF3kDffRfUH/bTxOxHhV6lxwIB3Vfj91rEwNMS9MXo=
 | 
					github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691/go.mod h1:YLF3kDffRfUH/bTxOxHhV6lxwIB3Vfj91rEwNMS9MXo=
 | 
				
			||||||
github.com/yuin/goldmark-meta v1.0.0 h1:ScsatUIT2gFS6azqzLGUjgOnELsBOxMXerM3ogdJhAM=
 | 
					github.com/yuin/goldmark-meta v1.0.0 h1:ScsatUIT2gFS6azqzLGUjgOnELsBOxMXerM3ogdJhAM=
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,7 +125,6 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
 | 
				
			|||||||
				return err
 | 
									return err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			infos[i] = uploadInfo
 | 
								infos[i] = uploadInfo
 | 
				
			||||||
 | 
					 | 
				
			||||||
		} else if objectHash, err = t.HashObject(file); err != nil {
 | 
							} else if objectHash, err = t.HashObject(file); err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -133,7 +132,6 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
 | 
				
			|||||||
		// Add the object to the index
 | 
							// Add the object to the index
 | 
				
			||||||
		if err := t.AddObjectToIndex("100644", objectHash, path.Join(opts.TreePath, uploadInfo.upload.Name)); err != nil {
 | 
							if err := t.AddObjectToIndex("100644", objectHash, path.Join(opts.TreePath, uploadInfo.upload.Name)); err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -170,28 +168,10 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
 | 
				
			|||||||
	// OK now we can insert the data into the store - there's no way to clean up the store
 | 
						// OK now we can insert the data into the store - there's no way to clean up the store
 | 
				
			||||||
	// once it's in there, it's in there.
 | 
						// once it's in there, it's in there.
 | 
				
			||||||
	contentStore := &lfs.ContentStore{ObjectStorage: storage.LFS}
 | 
						contentStore := &lfs.ContentStore{ObjectStorage: storage.LFS}
 | 
				
			||||||
	for _, uploadInfo := range infos {
 | 
						for _, info := range infos {
 | 
				
			||||||
		if uploadInfo.lfsMetaObject == nil {
 | 
							if err := uploadToLFSContentStore(info, contentStore); err != nil {
 | 
				
			||||||
			continue
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		exist, err := contentStore.Exists(uploadInfo.lfsMetaObject)
 | 
					 | 
				
			||||||
		if err != nil {
 | 
					 | 
				
			||||||
			return cleanUpAfterFailure(&infos, t, err)
 | 
								return cleanUpAfterFailure(&infos, t, err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if !exist {
 | 
					 | 
				
			||||||
			file, err := os.Open(uploadInfo.upload.LocalPath())
 | 
					 | 
				
			||||||
			if err != nil {
 | 
					 | 
				
			||||||
				return cleanUpAfterFailure(&infos, t, err)
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			defer file.Close()
 | 
					 | 
				
			||||||
			// FIXME: Put regenerates the hash and copies the file over.
 | 
					 | 
				
			||||||
			// I guess this strictly ensures the soundness of the store but this is inefficient.
 | 
					 | 
				
			||||||
			if err := contentStore.Put(uploadInfo.lfsMetaObject, file); err != nil {
 | 
					 | 
				
			||||||
				// OK Now we need to cleanup
 | 
					 | 
				
			||||||
				// Can't clean up the store, once uploaded there they're there.
 | 
					 | 
				
			||||||
				return cleanUpAfterFailure(&infos, t, err)
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Then push this tree to NewBranch
 | 
						// Then push this tree to NewBranch
 | 
				
			||||||
@@ -201,3 +181,29 @@ func UploadRepoFiles(repo *models.Repository, doer *models.User, opts *UploadRep
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	return models.DeleteUploads(uploads...)
 | 
						return models.DeleteUploads(uploads...)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func uploadToLFSContentStore(info uploadInfo, contentStore *lfs.ContentStore) error {
 | 
				
			||||||
 | 
						if info.lfsMetaObject == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						exist, err := contentStore.Exists(info.lfsMetaObject)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if !exist {
 | 
				
			||||||
 | 
							file, err := os.Open(info.upload.LocalPath())
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							defer file.Close()
 | 
				
			||||||
 | 
							// FIXME: Put regenerates the hash and copies the file over.
 | 
				
			||||||
 | 
							// I guess this strictly ensures the soundness of the store but this is inefficient.
 | 
				
			||||||
 | 
							if err := contentStore.Put(info.lfsMetaObject, file); err != nil {
 | 
				
			||||||
 | 
								// OK Now we need to cleanup
 | 
				
			||||||
 | 
								// Can't clean up the store, once uploaded there they're there.
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								vendor/github.com/yuin/goldmark/extension/table.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								vendor/github.com/yuin/goldmark/extension/table.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -20,6 +20,7 @@ var escapedPipeCellListKey = parser.NewContextKey()
 | 
				
			|||||||
type escapedPipeCell struct {
 | 
					type escapedPipeCell struct {
 | 
				
			||||||
	Cell        *ast.TableCell
 | 
						Cell        *ast.TableCell
 | 
				
			||||||
	Pos         []int
 | 
						Pos         []int
 | 
				
			||||||
 | 
						Transformed bool
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TableCellAlignMethod indicates how are table cells aligned in HTML format.indicates how are table cells aligned in HTML format.
 | 
					// TableCellAlignMethod indicates how are table cells aligned in HTML format.indicates how are table cells aligned in HTML format.
 | 
				
			||||||
@@ -216,7 +217,7 @@ func (b *tableParagraphTransformer) parseRow(segment text.Segment, alignments []
 | 
				
			|||||||
					break
 | 
										break
 | 
				
			||||||
				} else if hasBacktick {
 | 
									} else if hasBacktick {
 | 
				
			||||||
					if escapedCell == nil {
 | 
										if escapedCell == nil {
 | 
				
			||||||
						escapedCell = &escapedPipeCell{node, []int{}}
 | 
											escapedCell = &escapedPipeCell{node, []int{}, false}
 | 
				
			||||||
						escapedList := pc.ComputeIfAbsent(escapedPipeCellListKey,
 | 
											escapedList := pc.ComputeIfAbsent(escapedPipeCellListKey,
 | 
				
			||||||
							func() interface{} {
 | 
												func() interface{} {
 | 
				
			||||||
								return []*escapedPipeCell{}
 | 
													return []*escapedPipeCell{}
 | 
				
			||||||
@@ -288,22 +289,34 @@ func (a *tableASTTransformer) Transform(node *gast.Document, reader text.Reader,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	pc.Set(escapedPipeCellListKey, nil)
 | 
						pc.Set(escapedPipeCellListKey, nil)
 | 
				
			||||||
	for _, v := range lst.([]*escapedPipeCell) {
 | 
						for _, v := range lst.([]*escapedPipeCell) {
 | 
				
			||||||
 | 
							if v.Transformed {
 | 
				
			||||||
 | 
								continue
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		_ = gast.Walk(v.Cell, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
 | 
							_ = gast.Walk(v.Cell, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
 | 
				
			||||||
			if n.Kind() != gast.KindCodeSpan {
 | 
								if !entering || n.Kind() != gast.KindCodeSpan {
 | 
				
			||||||
				return gast.WalkContinue, nil
 | 
									return gast.WalkContinue, nil
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			c := n.FirstChild()
 | 
					
 | 
				
			||||||
			for c != nil {
 | 
								for c := n.FirstChild(); c != nil; {
 | 
				
			||||||
				next := c.NextSibling()
 | 
									next := c.NextSibling()
 | 
				
			||||||
				if c.Kind() == gast.KindText {
 | 
									if c.Kind() != gast.KindText {
 | 
				
			||||||
					t := c.(*gast.Text)
 | 
										c = next
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									parent := c.Parent()
 | 
				
			||||||
 | 
									ts := &c.(*gast.Text).Segment
 | 
				
			||||||
 | 
									n := c
 | 
				
			||||||
 | 
									for _, v := range lst.([]*escapedPipeCell) {
 | 
				
			||||||
					for _, pos := range v.Pos {
 | 
										for _, pos := range v.Pos {
 | 
				
			||||||
						if t.Segment.Start <= pos && t.Segment.Stop > pos {
 | 
											if ts.Start <= pos && pos < ts.Stop {
 | 
				
			||||||
							n1 := gast.NewRawTextSegment(t.Segment.WithStop(pos))
 | 
												segment := n.(*gast.Text).Segment
 | 
				
			||||||
							n2 := gast.NewRawTextSegment(t.Segment.WithStart(pos + 1))
 | 
												n1 := gast.NewRawTextSegment(segment.WithStop(pos))
 | 
				
			||||||
							n.InsertAfter(n, c, n1)
 | 
												n2 := gast.NewRawTextSegment(segment.WithStart(pos + 1))
 | 
				
			||||||
							n.InsertAfter(n, n1, n2)
 | 
												parent.InsertAfter(parent, n, n1)
 | 
				
			||||||
							n.RemoveChild(n, c)
 | 
												parent.InsertAfter(parent, n1, n2)
 | 
				
			||||||
 | 
												parent.RemoveChild(parent, n)
 | 
				
			||||||
 | 
												n = n2
 | 
				
			||||||
 | 
												v.Transformed = true
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							@@ -798,7 +798,7 @@ github.com/xi2/xz
 | 
				
			|||||||
# github.com/yohcop/openid-go v1.0.0
 | 
					# github.com/yohcop/openid-go v1.0.0
 | 
				
			||||||
## explicit
 | 
					## explicit
 | 
				
			||||||
github.com/yohcop/openid-go
 | 
					github.com/yohcop/openid-go
 | 
				
			||||||
# github.com/yuin/goldmark v1.3.2
 | 
					# github.com/yuin/goldmark v1.3.3
 | 
				
			||||||
## explicit
 | 
					## explicit
 | 
				
			||||||
github.com/yuin/goldmark
 | 
					github.com/yuin/goldmark
 | 
				
			||||||
github.com/yuin/goldmark/ast
 | 
					github.com/yuin/goldmark/ast
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user