diff --git a/models/publickey.go b/models/publickey.go index 70da8057cea3..400486eba7e7 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -386,9 +386,6 @@ func ListPublicKeys(uid int64) ([]*PublicKey, error) { // rewriteAuthorizedKeys finds and deletes corresponding line in authorized_keys file. func rewriteAuthorizedKeys(key *PublicKey, p, tmpP string) error { - sshOpLocker.Lock() - defer sshOpLocker.Unlock() - fr, err := os.Open(p) if err != nil { return err @@ -444,6 +441,9 @@ func UpdatePublicKey(key *PublicKey) error { } func deletePublicKey(e *xorm.Session, key *PublicKey) error { + sshOpLocker.Lock() + defer sshOpLocker.Unlock() + has, err := e.Get(key) if err != nil { return err diff --git a/modules/base/markdown.go b/modules/base/markdown.go index d06e1338e778..03f1287c1d2d 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -198,7 +198,6 @@ func RenderRawMarkdown(body []byte, urlPrefix string) []byte { extensions |= blackfriday.EXTENSION_FENCED_CODE extensions |= blackfriday.EXTENSION_AUTOLINK extensions |= blackfriday.EXTENSION_STRIKETHROUGH - extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK extensions |= blackfriday.EXTENSION_SPACE_HEADERS extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK