diff --git a/admin/sync/exercice_files.go b/admin/sync/exercice_files.go index 54a4ed53..0a0a9adc 100644 --- a/admin/sync/exercice_files.go +++ b/admin/sync/exercice_files.go @@ -127,6 +127,11 @@ func SyncExerciceFiles(i Importer, exercice fic.Exercice) (errs []string) { // Import standard files for _, fname := range files { + // Enforce file format + if path.Ext(fname) == "rar" || path.Ext(fname) == "7z" { + errs = append(errs, fmt.Sprintf("%q: WARNING %q use a forbidden archive type.", path.Base(exercice.Path), fname)) + } + if f, err := i.importFile(path.Join(exercice.Path, "files", fname), func(filePath string, origin string) (interface{}, error) { return exercice.ImportFile(filePath, origin, digests[fname]) diff --git a/repochecker/update.go b/repochecker/update.go index d99869b0..8144228c 100644 --- a/repochecker/update.go +++ b/repochecker/update.go @@ -1,3 +1,4 @@ +//go:build checkupdate // +build checkupdate package main @@ -9,7 +10,7 @@ import ( "net/http" ) -const version = 10 +const version = 11 func init() { go checkUpdate()