Commit 711a3a08 authored by Jonathon Duerig's avatar Jonathon Duerig

Truncate expires to nearest second when parsing a credential

parent bdb8258c
......@@ -460,6 +460,10 @@ sub CreateFromSigned($$;$)
goto bad;
}
my $expires = $expires_node->to_literal();
if ($expires =~ /^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d)(\.\d+)?Z?$/)
{
$expires = $1 . 'Z';
}
if (! ($expires =~ /^[-\w:.\/]+/)) {
$msg = "Invalid expires date in credential";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment