chiark / gitweb /
Empty back= should be treated as if absent
[disorder] / server / actions.c
index 1372733c0463bf175be80850827758821aefa616..2468b77ad1837dd7895bb523737d551b7851021d 100644 (file)
@@ -33,7 +33,7 @@ static void redirect(const char *url) {
   /* By default use the 'back' argument */
   if(!url)
     url = cgi_get("back");
   /* By default use the 'back' argument */
   if(!url)
     url = cgi_get("back");
-  if(url) {
+  if(url && *url) {
     if(strncmp(url, "http", 4))
       /* If the target is not a full URL assume it's the action */
       url = cgi_makeurl(config->url, "action", url, (char *)0);
     if(strncmp(url, "http", 4))
       /* If the target is not a full URL assume it's the action */
       url = cgi_makeurl(config->url, "action", url, (char *)0);