mirror of
https://github.com/restic/restic.git
synced 2026-10-11 04:27:12 +00:00
server: Check repository version
This commit is contained in:
1 parent
5399358272
commit
ae1a85c896
1 file changed
+4
@@ -559,6 +559,10 @@ func (s *Server) loadConfig(cfg *Config) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.Version != RepositoryVersion {
|
||||
return errors.New("unsupported repository version")
|
||||
}
|
||||
|
||||
if !cfg.ChunkerPolynomial.Irreducible() {
|
||||
return errors.New("invalid chunker polynomial")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user