Add check for legal project name
authorFrank Duncan <frank@kank.net>
Fri, 10 Dec 2021 11:47:31 +0000 (05:47 -0600)
committerFrank Duncan <frank@kank.net>
Fri, 10 Dec 2021 11:47:31 +0000 (05:47 -0600)
src/main/server.lisp

index 432c83dffb6ff3338f77fe76e80be88c12034681..6202cd0b86575ed3d85c50ccccecf192f0b0812b 100644 (file)
@@ -12,6 +12,9 @@
  (communication:start-listener port background))
 
 (defun add-project (name src)
+ (when
+  (not (cl-ppcre:scan "^[0-9A-Za-z-]*$" name))
+  (error "Name contains invalid characters"))
  (make-project :name name :src src)
  t)