0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

url encode wifiboxid for signin

This commit is contained in:
peteruithoven 2013-10-26 01:29:34 +02:00
parent 2d686d94d2
commit 3e8fe104c9

View File

@ -4,6 +4,7 @@ local uci = require('uci').cursor()
local iwinfo = require('iwinfo') local iwinfo = require('iwinfo')
local settings = require('util.settings') local settings = require('util.settings')
local wifi = require("network.wlanconfig") local wifi = require("network.wlanconfig")
local urlcode = require('util.urlcode')
local M = {} local M = {}
@ -19,6 +20,7 @@ function M.signin()
end end
local wifiboxid = wifi.getSubstitutedSsid(settings.get('network.cl.wifiboxid')) local wifiboxid = wifi.getSubstitutedSsid(settings.get('network.cl.wifiboxid'))
wifiboxid = urlcode.escape(wifiboxid)
local cmd = "wget -q -T 2 -t 1 -O - "..baseurl.."?wifiboxid="..wifiboxid.."\\&localip="..localip; local cmd = "wget -q -T 2 -t 1 -O - "..baseurl.."?wifiboxid="..wifiboxid.."\\&localip="..localip;
local output = utils.captureCommandOutput(cmd); local output = utils.captureCommandOutput(cmd);