Security fix: Incorrect permission assignment for critical resource
This commit is contained in:
parent
499e251796
commit
f097c029f3
10 changed files with 17 additions and 17 deletions
|
@ -172,7 +172,7 @@ func genTeamIssuesFile(teamid int64) error {
|
|||
}
|
||||
|
||||
if s, err := os.Stat(dirPath); os.IsNotExist(err) {
|
||||
os.MkdirAll(dirPath, 0777)
|
||||
os.MkdirAll(dirPath, 0751)
|
||||
} else if !s.IsDir() {
|
||||
return fmt.Errorf("%s is not a directory", dirPath)
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ func genTeamMyFile(teamid int64) error {
|
|||
dirPath := path.Join(TeamsDir, fmt.Sprintf("%d", team.Id))
|
||||
|
||||
if s, err := os.Stat(dirPath); os.IsNotExist(err) {
|
||||
os.MkdirAll(dirPath, 0777)
|
||||
os.MkdirAll(dirPath, 0751)
|
||||
} else if !s.IsDir() {
|
||||
return fmt.Errorf("%s is not a directory", dirPath)
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ func genMyPublicFile() error {
|
|||
dirPath := path.Join(TeamsDir, "public")
|
||||
|
||||
if s, err := os.Stat(dirPath); os.IsNotExist(err) {
|
||||
os.MkdirAll(dirPath, 0777)
|
||||
os.MkdirAll(dirPath, 0751)
|
||||
} else if !s.IsDir() {
|
||||
return fmt.Errorf("%s is not a directory", dirPath)
|
||||
}
|
||||
|
|
Reference in a new issue