diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-13 04:52:24 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-04-13 10:52:24 +0800 |
commit | d409d3ab57894de853bbc5fbacf32628b4d8fa1e (patch) | |
tree | 3387b30bad4f0f3fbc740b28cdbf4e23620ce96d /models/user.go | |
parent | 21290d4e80711fb0de8dd101db8c6d1c5171a627 (diff) | |
download | gitea-d409d3ab57894de853bbc5fbacf32628b4d8fa1e.tar.gz gitea-d409d3ab57894de853bbc5fbacf32628b4d8fa1e.zip |
Sanitation fix from Gogs (#1461)
* Santiation fix from Gogs
* Linting
* Fix build-errors
* still not working
* Fix all the things!
* gofmt
* Add code-injection checks
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go index 72c21f4369..59ce631172 100644 --- a/models/user.go +++ b/models/user.go @@ -163,7 +163,7 @@ func (u *User) UpdateDiffViewStyle(style string) error { func (u *User) AfterSet(colName string, _ xorm.Cell) { switch colName { case "full_name": - u.FullName = markdown.Sanitizer.Sanitize(u.FullName) + u.FullName = markdown.Sanitize(u.FullName) case "created_unix": u.Created = time.Unix(u.CreatedUnix, 0).Local() case "updated_unix": @@ -867,7 +867,7 @@ func updateUser(e Engine, u *User) error { u.Website = base.TruncateString(u.Website, 255) u.Description = base.TruncateString(u.Description, 255) - u.FullName = markdown.Sanitizer.Sanitize(u.FullName) + u.FullName = markdown.Sanitize(u.FullName) _, err := e.Id(u.ID).AllCols().Update(u) return err } |