]> git.draconx.ca Git - homepage.git/blobdiff - tools/weblog-update.rb
cdecl99-1.3 bash-5 hotfix
[homepage.git] / tools / weblog-update.rb
index f955f245d9ff3a4f861ea292f2922df40fd33ae7..677f3678166223e1921a0655cf72ba8429dc9b09 100755 (executable)
@@ -29,7 +29,7 @@ if content =~ /\A---(--)?\s*$/
 end
 
 if metadata
-    meta = YAML.load(metadata)
+    meta = YAML.load(metadata, permitted_classes: [Time])
     timefmt = "%FT%T%z"
     updatestr = updatetime.round.strftime(timefmt)
     autoset = nil
@@ -49,7 +49,7 @@ if metadata
 
     if autoset
         # Revalidate YAML
-        meta = YAML.load(metadata)
+        meta = YAML.load(metadata, permitted_classes: [Time])
         unless meta[autoset] == updatetime.round
             raise "failed to auto-insert " + autoset
         end