Validating archive route constraint

This commit is contained in:
Sebastien Ros
2013-10-21 17:09:57 -07:00
parent a69087c7bf
commit 11b8b90935

View File

@@ -27,6 +27,14 @@ namespace Orchard.Blogs.Routing {
return false;
}
try {
// is this a valid date ?
archiveData.ToDateTime();
}
catch {
return false;
}
return _blogPathConstraint.FindPath(path) != null;
}