modules/freifunk: Prevent injections
This commit is contained in:
parent
8027502b35
commit
a5e14ba6b2
1 changed files with 5 additions and 3 deletions
|
@ -64,10 +64,12 @@ end
|
|||
for k, line in ipairs(table) do
|
||||
local field = {}
|
||||
-- split line at # and |, 1=url, 2=proto, 3=description, 4=source
|
||||
local field = luci.util.split(line, "[#|]", split, true) %>
|
||||
local field = luci.util.split(line, "[#|]", split, true)
|
||||
url,descr,origin = pcdata(field[1]),pcdata(field[3]),pcdata(field[4])
|
||||
%>
|
||||
<tr class="cbi-section-table-row cbi-rowstyle-<%=i%>">
|
||||
<td class="cbi-section-table-cell"><a href="<%=field[1]%>"><%=field[3]%></a></td>
|
||||
<td class="cbi-section-table-cell"><%=field[4]%></td>
|
||||
<td class="cbi-section-table-cell"><a href="<%=url%>"><%=descr%></a></td>
|
||||
<td class="cbi-section-table-cell"><%=origin%></td>
|
||||
</tr>
|
||||
<% if i == 1 then i = 0 elseif i == 0 then i = 1 end %>
|
||||
<%end%>
|
||||
|
|
Loading…
Reference in a new issue