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
|
|
@ -107,7 +107,7 @@ func main() {
|
|||
|
||||
log.Println("Creating submission directory...")
|
||||
if _, err := os.Stat(path.Join(SubmissionDir, ".tmp")); os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(path.Join(SubmissionDir, ".tmp"), 0777); err != nil {
|
||||
if err := os.MkdirAll(path.Join(SubmissionDir, ".tmp"), 0700); err != nil {
|
||||
log.Fatal("Unable to create submission directory: ", err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ func registrationProcess(id string, team *fic.Team, members []fic.Member, team_i
|
|||
teamDirPath := fmt.Sprintf("%d", team.Id)
|
||||
|
||||
// Create team directories into TEAMS
|
||||
if err := os.MkdirAll(path.Join(TeamsDir, teamDirPath), 0777); err != nil {
|
||||
if err := os.MkdirAll(path.Join(TeamsDir, teamDirPath), 0751); err != nil {
|
||||
log.Println(id, "[ERR]", err)
|
||||
}
|
||||
if err := os.Symlink(teamDirPath, path.Join(TeamsDir, team_id)); err != nil {
|
||||
|
|
|
|||
Reference in a new issue