Prevent opening file systems that were created with newer versions of CryFS
This commit is contained in:
parent
2fbed11431
commit
257b028511
@ -61,6 +61,9 @@ void CryConfigLoader::_checkVersion(const CryConfig &config) {
|
||||
if (!boost::starts_with(config.Version(), allowedVersionPrefix)) {
|
||||
throw std::runtime_error(string() + "This filesystem was created with CryFS " + config.Version() + " and is incompatible. Please create a new one with your version of CryFS and migrate your data.");
|
||||
}
|
||||
if (gitversion::VersionCompare::isOlderThan(gitversion::VersionString(), config.Version())) {
|
||||
throw std::runtime_error(string() + "This filesystem was used with CryFS " + config.Version() + " and should not be opened with older versions anymore. Please update your CryFS version.");
|
||||
}
|
||||
}
|
||||
|
||||
void CryConfigLoader::_checkCipher(const CryConfig &config) const {
|
||||
|
Loading…
Reference in New Issue
Block a user