validate format of blog and gallery fields

Change-Id: I757d17e746a76fac0006edc0272b2f665dd730f8
This commit is contained in:
Ryan Barrett 2013-01-20 14:04:41 -08:00
parent 7e448fe05e
commit 759ea2b4e6
1 changed files with 2 additions and 2 deletions

View File

@ -207,8 +207,8 @@ func handleSetupChange(rw http.ResponseWriter, req *http.Request) {
if len(v[0]) > 0 {
pub := strings.Split(v[0], ",")
if len(pub) < 2 || len(pub) > 3 {
// no need to fail loudly for now as we'll probably change this format
continue
httputil.ServerError(rw, req, fmt.Errorf("%s must be of the format ROOT,TEMPLATE,STYLESHEET", k))
return
}
handler := jsonconfig.Obj{}
handler["template"] = k