From f789102e91a2a3e02b0f13173129fbcebb437607 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 2 Jun 2015 10:19:52 -0400 Subject: Proper fix for provisioning.cgi to work with haserl-0.9.33 and later - turn off POST processing --- cgi-bin/provisioning.cgi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cgi-bin/provisioning.cgi b/cgi-bin/provisioning.cgi index ae4255c..67381bb 100755 --- a/cgi-bin/provisioning.cgi +++ b/cgi-bin/provisioning.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/haserl --shell=lua +#!/usr/bin/haserl --shell=lua --accept-none <% posix = require "posix" @@ -138,12 +138,7 @@ if ( request_method == "GET" ) then APP:dispatch("/provisioning/", "provisioning", "getfile", clientdata) APP:destroy() elseif ( request_method == "PUT" ) then - local data - if POST and POST.body and POST.body ~= "" then - data = POST.body - else - data = io.stdin:read("*all") - end + local data = io.stdin:read("*all") local success = true -- Protect against writing to arbitrary paths -- cgit v1.2.3