Changeset 448 for branches/htmlform/cgi-bin/main.cgi
- Timestamp:
- 07/27/10 13:56:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/main.cgi
r447 r448 825 825 $html =~ s|\$\$ALLOC_FROM\$\$|$alloc_from|g; 826 826 $html =~ s|\$\$CIDR\$\$|$cidr|g; 827 $webvar{city} = desanitize($webvar{city});827 $webvar{city} = $q->escapeHTML($webvar{city}); 828 828 $html =~ s|\$\$CITY\$\$|$webvar{city}|g; 829 829 $html =~ s|\$\$CUSTID\$\$|$webvar{custid}|g; 830 $webvar{circid} = desanitize($webvar{circid});830 $webvar{circid} = $q->escapeHTML($webvar{circid}); 831 831 $html =~ s|\$\$CIRCID\$\$|$webvar{circid}|g; 832 $webvar{desc} = desanitize($webvar{desc});832 $webvar{desc} = $q->escapeHTML($webvar{desc}); 833 833 $html =~ s|\$\$DESC\$\$|$webvar{desc}|g; 834 $webvar{notes} = desanitize($webvar{notes});834 $webvar{notes} = $q->escapeHTML($webvar{notes}); 835 835 $html =~ s|\$\$NOTES\$\$|$webvar{notes}|g; 836 836 $html =~ s|\$\$ACTION\$\$|insert|g; … … 841 841 if ($IPDBacl{$authuser} =~ /s/) { 842 842 $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>). 843 qq(<td class=regular>$webvar{privdata}). 844 qq(<input type=hidden name=privdata value="$webvar{privdata}"></td></tr>\n); 843 "<td class=regular>".$q->escapeHTML($webvar{privdata}). 844 qq(<input type=hidden name=privdata value=").$q->escapeHTML($webvar{privdata}). 845 qq("></td></tr>\n); 845 846 $i++; 846 847 } … … 1180 1181 # Relatively simple SQL transaction here. 1181 1182 my $sql; 1183 ##fixme: SQL parameters (#34) 1184 # need to make sure we log roughly the same info 1182 1185 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 1183 1186 $sql = "update poolips set custid='$webvar{custid}',notes='$webvar{notes}',". … … 1244 1247 my $swiptmp = ($webvar{swip} eq 'on' ? 'Yes' : 'No'); 1245 1248 $html =~ s/\$\$BLOCK\$\$/$webvar{block}/g; 1246 $webvar{city} = desanitize($webvar{city});1249 $webvar{city} = $q->escapeHTML($webvar{city}); 1247 1250 $html =~ s/\$\$CITY\$\$/$webvar{city}/g; 1248 1251 $html =~ s/\$\$ALLOCTYPE\$\$/$webvar{alloctype}/g; … … 1250 1253 $html =~ s/\$\$CUSTID\$\$/$webvar{custid}/g; 1251 1254 $html =~ s/\$\$SWIP\$\$/$swiptmp/g; 1252 $webvar{circid} = desanitize($webvar{circid});1255 $webvar{circid} = $q->escapeHTML($webvar{circid}); 1253 1256 $html =~ s/\$\$CIRCID\$\$/$webvar{circid}/g; 1254 $webvar{desc} = desanitize($webvar{desc});1257 $webvar{desc} = $q->escapeHTML($webvar{desc}); 1255 1258 $html =~ s/\$\$DESC\$\$/$webvar{desc}/g; 1256 $webvar{notes} = desanitize($webvar{notes});1259 $webvar{notes} = $q->escapeHTML($webvar{notes}); 1257 1260 $html =~ s/\$\$NOTES\$\$/$webvar{notes}/g; 1258 1261 $html =~ s/\$\$BACKLINK\$\$/$backlink/g; … … 1261 1264 if ($IPDBacl{$authuser} =~ /s/) { 1262 1265 $privdata = qq(<tr class="color2"><td valign="top">Restricted data:</td>). 1263 qq(<td class="regular">). desanitize($webvar{privdata}).qq(</td></tr>\n);1266 qq(<td class="regular">).$q->escapeHTML($webvar{privdata}).qq(</td></tr>\n); 1264 1267 } 1265 1268 $html =~ s/\$\$PRIVDATA\$\$/$privdata/g;
Note:
See TracChangeset
for help on using the changeset viewer.