From 66c3619872bcf723d7bac550165ad5658de95644 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Fri, 18 Feb 2022 23:54:57 +0000 Subject: [PATCH] Early spring clean: Remove trailing whitespaces, and correct licence headers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bumping across one of our scripts with very long trailing whitespaces, I thought it might be a good idea to clean these up. Doing so, some missing or inconsistent licence headers were fixed. There is no need in shipping all these files en bloc, as their functionality won't change. Signed-off-by: Peter Müller --- html/cgi-bin/aliases.cgi | 40 +- html/cgi-bin/atm-status.cgi | 14 +- html/cgi-bin/chpasswd.cgi | 2 +- html/cgi-bin/connections.cgi | 10 +- html/cgi-bin/connscheduler.cgi | 8 +- html/cgi-bin/dhcp.cgi | 78 +- html/cgi-bin/dnsforward.cgi | 2 +- html/cgi-bin/extrahd.cgi | 4 +- html/cgi-bin/firewall.cgi | 32 +- html/cgi-bin/fwhosts.cgi | 90 +-- html/cgi-bin/getrrdimage.cgi | 8 +- html/cgi-bin/gpl.cgi | 2 +- html/cgi-bin/hosts.cgi | 18 +- html/cgi-bin/index.cgi | 6 +- html/cgi-bin/iptables.cgi | 10 +- html/cgi-bin/logs.cgi/calamaris.dat | 10 +- html/cgi-bin/logs.cgi/firewalllog.dat | 30 +- html/cgi-bin/logs.cgi/firewalllogcountry.dat | 10 +- html/cgi-bin/logs.cgi/firewalllogip.dat | 14 +- html/cgi-bin/logs.cgi/firewalllogport.dat | 6 +- html/cgi-bin/logs.cgi/ids.dat | 8 +- html/cgi-bin/logs.cgi/ovpnclients.dat | 2 +- html/cgi-bin/logs.cgi/proxylog.dat | 20 +- .../logs.cgi/showrequestfromcountry.dat | 28 +- html/cgi-bin/logs.cgi/showrequestfromip.dat | 20 +- html/cgi-bin/logs.cgi/showrequestfromport.dat | 22 +- html/cgi-bin/logs.cgi/summary.dat | 2 +- html/cgi-bin/logs.cgi/urlfilter.dat | 12 +- html/cgi-bin/mac.cgi | 56 +- html/cgi-bin/mail.cgi | 10 +- html/cgi-bin/modem.cgi | 4 +- html/cgi-bin/netexternal.cgi | 8 +- html/cgi-bin/ovpnmain.cgi | 682 +++++++++--------- html/cgi-bin/proxy.cgi | 2 +- html/cgi-bin/remote.cgi | 6 +- html/cgi-bin/routing.cgi | 18 +- html/cgi-bin/samba.cgi | 6 +- html/cgi-bin/speed.cgi | 2 +- html/cgi-bin/time.cgi | 6 +- html/cgi-bin/updatexlrator.cgi | 2 +- html/cgi-bin/urlfilter.cgi | 8 +- html/cgi-bin/vulnerabilities.cgi | 2 +- html/cgi-bin/wakeonlan.cgi | 22 +- html/cgi-bin/webaccess.cgi | 4 +- html/cgi-bin/wireless.cgi | 14 +- html/cgi-bin/wirelessclient.cgi | 4 +- html/cgi-bin/zoneconf.cgi | 8 +- html/html/include/rrdimage.js | 8 +- .../redirect-templates/legacy/template.html | 2 +- html/html/redirect.cgi | 2 +- html/html/themes/ipfire/include/functions.pl | 2 +- lfs/7zip | 2 +- lfs/Config | 2 +- lfs/alac | 2 +- lfs/alsa | 2 +- lfs/apcupsd | 2 +- lfs/avahi | 6 +- lfs/aws-cli | 2 +- lfs/backup | 6 +- lfs/bacula | 2 +- lfs/binutils | 6 +- lfs/bird | 2 +- lfs/br2684ctl | 4 +- lfs/bwm-ng | 2 +- lfs/c-ares | 2 +- lfs/ca-certificates | 6 +- lfs/cifs-utils | 2 +- lfs/clamav | 4 +- lfs/cleanup-toolchain | 4 +- lfs/collectd | 4 +- lfs/core-updates | 2 +- lfs/cpufrequtils | 4 +- lfs/cups-filters | 2 +- lfs/dbus | 2 +- lfs/ddrescue | 4 +- lfs/dehydrated | 2 +- lfs/dnsdist | 2 +- lfs/ebtables | 2 +- lfs/elfutils | 2 +- lfs/elinks | 2 +- lfs/epson-inkjet-printer-escpr | 2 +- lfs/faad2 | 2 +- lfs/fake-environ | 6 +- lfs/fcron | 2 +- lfs/fetchmail | 2 +- lfs/ffmpeg | 2 +- lfs/firmware-update | 2 +- lfs/flac | 2 +- lfs/flashrom | 2 +- lfs/flex | 4 +- lfs/foomatic | 2 +- lfs/fping | 2 +- lfs/freefont | 2 +- lfs/freeradius | 2 +- lfs/frr | 2 +- lfs/gcc | 12 +- lfs/ghostscript | 2 +- lfs/gnump3d | 2 +- lfs/gptfdisk | 4 +- lfs/gutenprint | 4 +- lfs/haproxy | 2 +- lfs/hplip | 4 +- lfs/htop | 4 +- lfs/i2c-tools | 2 +- lfs/icinga | 2 +- lfs/iftop | 2 +- lfs/igmpproxy | 2 +- lfs/intltool | 2 +- lfs/iperf | 2 +- lfs/iptraf-ng | 2 +- lfs/jansson | 4 +- lfs/joe | 2 +- lfs/jq | 2 +- lfs/json-c | 2 +- lfs/keyutils | 2 +- lfs/knot | 2 +- lfs/krb5 | 2 +- lfs/lame | 2 +- lfs/lcdproc | 4 +- lfs/libaio | 2 +- lfs/libarchive | 2 +- lfs/libassuan | 2 +- lfs/libcdada | 4 +- lfs/libdaemon | 2 +- lfs/libedit | 2 +- lfs/libexif | 2 +- lfs/libffi | 2 +- lfs/libid3tag | 2 +- lfs/libinih | 2 +- lfs/libmad | 2 +- lfs/libmpdclient | 2 +- lfs/libmpeg2 | 2 +- lfs/libnl | 2 +- lfs/libnl-3 | 2 +- lfs/libogg | 2 +- lfs/libpri | 2 +- lfs/libshout | 2 +- lfs/libsolv | 2 +- lfs/libstatgrab | 2 +- lfs/libtalloc | 2 +- lfs/libtiff | 2 +- lfs/libtool | 2 +- lfs/liburcu | 2 +- lfs/libvirt | 2 +- lfs/libvorbis | 2 +- lfs/libyang | 2 +- lfs/linux | 2 +- lfs/lm_sensors | 2 +- lfs/lmdb | 2 +- lfs/logwatch | 4 +- lfs/lshw | 6 +- lfs/lvm2 | 2 +- lfs/lz4 | 2 +- lfs/make | 2 +- lfs/mc | 2 +- lfs/mcelog | 2 +- lfs/mdadm | 2 +- lfs/mdns-repeater | 2 +- lfs/minicom | 2 +- lfs/minidlna | 4 +- lfs/mpc | 2 +- lfs/mpd | 4 +- lfs/mpfire | 6 +- lfs/mtr | 2 +- lfs/multipath-tools | 2 +- lfs/nagios-plugins | 2 +- lfs/nagios_nrpe | 2 +- lfs/ncat | 2 +- lfs/ncdu | 4 +- lfs/netatalk | 2 +- lfs/netpbm | 2 +- lfs/nfs | 2 +- lfs/ninja | 2 +- lfs/ntfs-3g | 2 +- lfs/nut | 2 +- lfs/observium-agent | 2 +- lfs/openvmtools | 2 +- lfs/opus | 4 +- lfs/pakfire | 6 +- lfs/parted | 2 +- lfs/pcmciautils | 2 +- lfs/perl-Archive-Tar | 2 +- lfs/perl-Archive-Zip | 2 +- lfs/perl-Authen-SASL | 2 +- lfs/perl-BerkeleyDB | 2 +- lfs/perl-Carp-Clan | 2 +- lfs/perl-Convert-TNEF | 2 +- lfs/perl-Convert-UUlib | 2 +- lfs/perl-Date-Calc | 2 +- lfs/perl-Date-Manip | 2 +- lfs/perl-File-Tail | 2 +- lfs/perl-IO-Stringy | 2 +- lfs/perl-MIME-Base64 | 2 +- lfs/perl-Net-SMTP-SSL | 2 +- lfs/perl-Net-Server | 2 +- lfs/perl-Parse-Yapp | 2 +- lfs/perl-TimeDate | 2 +- lfs/perl-gettext | 2 +- lfs/pigz | 2 +- lfs/pmacct | 2 +- lfs/postfix | 2 +- lfs/powertop | 2 +- lfs/proxy-accounting | 6 +- lfs/python3-packaging | 2 +- lfs/python3-pyasn1 | 2 +- lfs/python3-pyproject2setuppy | 2 +- lfs/python3-toml | 2 +- lfs/python3-tomli | 2 +- lfs/qemu | 2 +- lfs/qemu-ga | 10 +- lfs/rpcbind | 2 +- lfs/rsync | 2 +- lfs/rtl8189es | 2 +- lfs/rtl8812au | 2 +- lfs/rtl8822bu | 2 +- lfs/rust-aho-corasick | 2 +- lfs/rust-autocfg | 2 +- lfs/rust-block-buffer | 2 +- lfs/rust-cfg-if | 2 +- lfs/rust-cipher | 2 +- lfs/rust-crossbeam-channel | 2 +- lfs/rust-crossbeam-deque | 2 +- lfs/rust-crossbeam-epoch | 2 +- lfs/rust-crossbeam-utils | 2 +- lfs/rust-crypto-common | 2 +- lfs/rust-ctor | 2 +- lfs/rust-digest | 2 +- lfs/rust-dirs | 2 +- lfs/rust-dissimilar | 2 +- lfs/rust-either | 2 +- lfs/rust-generic-array | 2 +- lfs/rust-getrandom | 2 +- lfs/rust-ghost | 2 +- lfs/rust-glob | 2 +- lfs/rust-hex | 2 +- lfs/rust-home | 2 +- lfs/rust-indoc | 2 +- lfs/rust-indoc-impl | 2 +- lfs/rust-instant | 2 +- lfs/rust-inventory | 2 +- lfs/rust-inventory-impl | 2 +- lfs/rust-itoa | 2 +- lfs/rust-lazy-static | 2 +- lfs/rust-libc | 2 +- lfs/rust-lock_api | 2 +- lfs/rust-log | 2 +- lfs/rust-memchr | 2 +- lfs/rust-memoffset | 2 +- lfs/rust-num_cpus | 2 +- lfs/rust-once_cell | 2 +- lfs/rust-parking_lot | 2 +- lfs/rust-parking_lot_core | 2 +- lfs/rust-paste | 2 +- lfs/rust-paste-impl | 2 +- lfs/rust-pest | 2 +- lfs/rust-ppv-lite86 | 2 +- lfs/rust-proc-macro-hack | 2 +- lfs/rust-proc-macro2 | 2 +- lfs/rust-pyo3 | 2 +- lfs/rust-pyo3-build-config | 2 +- lfs/rust-pyo3-macros | 2 +- lfs/rust-pyo3-macros-backend | 2 +- lfs/rust-quote | 2 +- lfs/rust-rand | 2 +- lfs/rust-rand-0.4 | 2 +- lfs/rust-rand_chacha | 2 +- lfs/rust-rand_core | 2 +- lfs/rust-rand_core-0.3.1 | 2 +- lfs/rust-rand_core-0.4.2 | 2 +- lfs/rust-rand_hc | 2 +- lfs/rust-rayon | 2 +- lfs/rust-rayon-core | 2 +- lfs/rust-rdrand | 2 +- lfs/rust-regex | 2 +- lfs/rust-regex-syntax | 2 +- lfs/rust-remove_dir_all | 2 +- lfs/rust-ryu | 2 +- lfs/rust-same-file | 2 +- lfs/rust-scopeguard | 2 +- lfs/rust-semver | 2 +- lfs/rust-semver-parser | 2 +- lfs/rust-serde | 2 +- lfs/rust-serde_derive | 2 +- lfs/rust-serde_json | 2 +- lfs/rust-smallvec | 2 +- lfs/rust-syn | 2 +- lfs/rust-synstructure | 2 +- lfs/rust-tempdir | 2 +- lfs/rust-termcolor | 2 +- lfs/rust-toml | 2 +- lfs/rust-toolchain_find | 2 +- lfs/rust-trybuild | 2 +- lfs/rust-typenum | 2 +- lfs/rust-ucd-trie | 2 +- lfs/rust-unicode-xid | 2 +- lfs/rust-unindent | 2 +- lfs/rust-version-check | 2 +- lfs/rust-walkdir | 2 +- lfs/sarg | 2 +- lfs/sdparm | 2 +- lfs/sed | 4 +- lfs/shairport-sync | 2 +- lfs/socat | 4 +- lfs/sox | 2 +- lfs/soxr | 2 +- lfs/spandsp | 2 +- lfs/spectre-meltdown-checker | 2 +- lfs/speedtest-cli | 2 +- lfs/spice | 2 +- lfs/squid | 2 +- lfs/squidclamav | 2 +- lfs/squidguard | 4 +- lfs/sshfs | 2 +- lfs/sslh | 2 +- lfs/stage2 | 4 +- lfs/stress | 2 +- lfs/swatch | 2 +- lfs/sysbench | 2 +- lfs/sysvinit | 2 +- lfs/taglib | 2 +- lfs/tcpdump | 2 +- lfs/telnet | 4 +- lfs/tftpd | 2 +- lfs/tmux | 2 +- lfs/traceroute | 4 +- lfs/transmission | 2 +- lfs/tshark | 2 +- lfs/u-boot | 4 +- lfs/u-boot-friendlyarm | 2 +- lfs/vdr | 2 +- lfs/vdr_dvbapi | 2 +- lfs/vdr_eepg | 2 +- lfs/vdr_epgsearch | 2 +- lfs/vdr_streamdev | 2 +- lfs/vdradmin | 2 +- lfs/vnstat | 2 +- lfs/w_scan | 2 +- lfs/watchdog | 4 +- lfs/wavemon | 2 +- lfs/web-user-interface | 4 +- lfs/whatmask | 2 +- lfs/wio | 6 +- lfs/xfsprogs | 2 +- lfs/xinetd | 2 +- lfs/xradio | 2 +- lfs/xvid | 2 +- lfs/zerofree | 2 +- lfs/zstd | 2 +- src/br2684ctl/br2684ctl.c | 50 +- src/initscripts/helper/aws-setup | 19 + src/initscripts/helper/azure-setup | 19 + src/initscripts/helper/exoscale-setup | 19 + src/initscripts/helper/gcp-setup | 19 + src/initscripts/helper/getdnsfromdhcpc.pl | 2 +- src/initscripts/helper/oci-setup | 19 + src/initscripts/networking/any | 41 +- src/initscripts/networking/dhcpcd.exe | 31 +- src/initscripts/networking/functions.network | 33 +- src/initscripts/networking/red | 79 +- src/initscripts/networking/wpa_supplicant.exe | 37 +- src/initscripts/packages/alsa | 27 +- src/initscripts/packages/amazon-ssm-agent | 24 +- src/initscripts/packages/apcupsd | 24 +- src/initscripts/packages/avahi | 28 +- src/initscripts/packages/bacula | 24 +- src/initscripts/packages/bird | 24 +- src/initscripts/packages/clamav | 22 +- src/initscripts/packages/cpufreq | 35 +- src/initscripts/packages/cups | 27 +- src/initscripts/packages/cyrus-sasl | 28 +- src/initscripts/packages/dnsdist | 27 +- src/initscripts/packages/fetchmail | 33 +- src/initscripts/packages/freeradius | 26 +- src/initscripts/packages/frr | 27 +- src/initscripts/packages/gnump3d | 33 +- src/initscripts/packages/guardian | 33 +- src/initscripts/packages/haproxy | 27 +- src/initscripts/packages/hostapd | 20 + src/initscripts/packages/keepalived | 27 +- src/initscripts/packages/lcdproc | 33 +- src/initscripts/packages/lcr | 45 -- src/initscripts/packages/libvirtd | 33 +- src/initscripts/packages/mdns-repeater | 24 +- src/initscripts/packages/messagebus | 28 +- src/initscripts/packages/minidlna | 31 +- src/initscripts/packages/monit | 27 +- src/initscripts/packages/mpd | 27 +- src/initscripts/packages/netatalk | 24 +- src/initscripts/packages/netsnmpd | 35 +- src/initscripts/packages/nfs-server | 28 +- src/initscripts/packages/nrpe | 22 +- src/initscripts/packages/nut | 19 + src/initscripts/packages/openvmtools | 35 +- src/initscripts/packages/pmacct | 24 +- src/initscripts/packages/postfix | 28 +- src/initscripts/packages/qemu-ga | 24 +- src/initscripts/packages/rpcbind | 33 +- src/initscripts/packages/samba | 25 +- src/initscripts/packages/shairport-sync | 24 +- src/initscripts/packages/sslh | 25 +- src/initscripts/packages/stunnel | 27 +- src/initscripts/packages/tftpd | 33 +- src/initscripts/packages/tor | 27 +- src/initscripts/packages/transmission | 33 +- src/initscripts/packages/vdr | 35 +- src/initscripts/packages/vdradmin | 36 +- src/initscripts/packages/virtlogd | 33 +- src/initscripts/packages/watchdog | 27 +- src/initscripts/packages/xinetd | 28 +- src/initscripts/packages/zabbix_agentd | 33 +- src/initscripts/sysconfig/rc.local | 2 +- src/initscripts/system/acpid | 27 +- src/initscripts/system/apache | 27 +- src/initscripts/system/beep | 39 +- src/initscripts/system/checkfs | 46 +- src/initscripts/system/cleanfs | 33 +- src/initscripts/system/cloud-init | 24 +- src/initscripts/system/collectd | 24 +- src/initscripts/system/connectd | 34 +- src/initscripts/system/conntrackd | 24 +- src/initscripts/system/console | 46 +- src/initscripts/system/dhcp | 26 +- src/initscripts/system/dhcrelay | 27 +- src/initscripts/system/fcron | 28 +- src/initscripts/system/fireinfo | 33 +- src/initscripts/system/firewall | 19 + src/initscripts/system/firstsetup | 19 + src/initscripts/system/fsresize | 33 +- src/initscripts/system/functions | 34 +- src/initscripts/system/halt | 33 +- src/initscripts/system/leds | 27 +- src/initscripts/system/localnet | 33 +- src/initscripts/system/lvmetad | 26 +- src/initscripts/system/modules | 33 +- src/initscripts/system/mountfs | 33 +- src/initscripts/system/mountkernfs | 33 +- src/initscripts/system/mounttmpfs | 27 +- src/initscripts/system/network | 33 +- src/initscripts/system/ntp | 22 +- src/initscripts/system/pakfire | 27 +- src/initscripts/system/partresize | 35 +- src/initscripts/system/random | 22 +- src/initscripts/system/rc | 33 +- src/initscripts/system/reboot | 33 +- src/initscripts/system/rngd | 29 +- src/initscripts/system/sendsignals | 33 +- src/initscripts/system/setclock | 31 +- src/initscripts/system/smartenabler | 22 +- src/initscripts/system/smt | 24 +- src/initscripts/system/squid | 22 +- src/initscripts/system/sshd | 28 +- src/initscripts/system/static-routes | 19 + src/initscripts/system/suricata | 39 +- src/initscripts/system/swap | 33 +- src/initscripts/system/swconfig | 29 +- src/initscripts/system/sysctl | 37 +- src/initscripts/system/sysklogd | 33 +- src/initscripts/system/template | 33 +- src/initscripts/system/udev | 33 +- src/initscripts/system/udev_retry | 35 +- src/initscripts/system/unbound | 25 +- src/initscripts/system/vnstat | 22 +- src/initscripts/system/waitdrives | 33 +- src/initscripts/system/wlanclient | 29 +- src/libsmooth/libsmooth.h | 4 +- src/libsmooth/main.c | 30 +- src/libsmooth/varval.c | 30 +- src/misc-progs/addonctrl.c | 2 +- src/misc-progs/fireinfoctrl.c | 8 +- src/misc-progs/getipstat.c | 10 +- src/misc-progs/iowrap.c | 10 +- src/misc-progs/ipfirereboot.c | 2 +- src/misc-progs/ipsecctrl.c | 14 +- src/misc-progs/openvpnctrl.c | 8 +- src/misc-progs/rebuildhosts.c | 4 +- src/misc-progs/sambactrl.c | 2 +- src/misc-progs/setaliases.c | 6 +- src/misc-progs/setuid.h | 2 +- src/misc-progs/sshctrl.c | 8 +- src/misc-progs/syslogdctrl.c | 4 +- src/misc-progs/updxlratorctrl.c | 2 +- src/misc-progs/urlfilterctrl.c | 2 +- src/misc-progs/wiohelper.c | 2 +- src/pakfire/lib/functions.pl | 114 +-- src/pakfire/pakfire | 58 +- src/scripts/archive.files | 2 +- src/scripts/backupiso | 19 + src/scripts/captive-cleanup | 2 +- src/scripts/connscheduler | 36 +- src/scripts/consort.sh | 8 +- src/scripts/convert-dns-settings | 8 +- src/scripts/convert-ovpn | 2 +- src/scripts/convert-to-location | 3 +- src/scripts/filesystem-cleanup | 40 +- src/scripts/hddshutdown | 8 +- src/scripts/ipsec-interfaces | 2 +- src/scripts/makegraphs | 3 +- src/scripts/openvpn-metrics | 40 +- src/scripts/ovpn-ccd-convert | 21 +- src/scripts/ovpn-collectd-convert | 21 +- src/scripts/qosd | 63 +- src/scripts/rebuild-initrd | 43 +- src/scripts/scanhd | 20 + src/scripts/settime | 32 +- src/scripts/timecheck | 31 +- src/scripts/timezone-transition | 42 +- src/scripts/update-ids-ruleset | 2 +- src/scripts/update-lang-cache | 20 + src/scripts/update-location-database | 2 +- tools/check_manualpages.pl | 6 +- tools/sort_strings.pl | 2 +- 511 files changed, 3703 insertions(+), 2565 deletions(-) delete mode 100644 src/initscripts/packages/lcr diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi index 85ed272048..7b80b3c844 100644 --- a/html/cgi-bin/aliases.cgi +++ b/html/cgi-bin/aliases.cgi @@ -62,7 +62,7 @@ $settings{'IP'} = ''; $settings{'ENABLED'} = 'off'; # Every check box must be set to off $settings{'NAME'} = ''; my @nosaved=('IP','ENABLED','NAME'); # List here ALL setting2 fields. Mandatory - + $settings{'ACTION'} = ''; # add/edit/remove $settings{'KEY1'} = ''; # point record for ACTION @@ -94,16 +94,16 @@ if (open(FILE, "$datafile")) { # Remove if no Setting1 needed # if ($settings{'ACTION'} eq $Lang::tr{'save'}) { - + # #Validate static Settings1 here # unless ($errormessage) { # Everything is ok, save settings - #map (delete ($settings{$_}) ,(@nosaved,'ACTION','KEY1'));# Must never be saved + #map (delete ($settings{$_}) ,(@nosaved,'ACTION','KEY1'));# Must never be saved #&General::writehash($setting, \%settings); # Save good settings #$settings{'ACTION'} = $Lang::tr{'save'}; # Recreate 'ACTION' #map ($settings{$_}= '',(@nosaved,'KEY1')); # and reinit var to empty - + # Rebuild configuration file if needed &BuildConfiguration; @@ -133,14 +133,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) { $temp[2] = '' if ( $temp[2] eq '' ); @current[$settings{'KEY1'}] = join (',',@temp)."\n"; $settings{'KEY1'} = ''; # End edit mode - + &General::log($Lang::tr{'ip alias changed'}); - + #Save current open(FILE, ">$datafile") or die 'Unable to open aliases file.'; print FILE @current; close(FILE); - + # Rebuild configuration file &BuildConfiguration; @@ -230,7 +230,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) { # Handle Suricata related actions. &HandleSuricata(); - + ## ## if entering data line is repetitive, choose here to not erase fields between each addition ## @@ -253,7 +253,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) { } if ($settings{'ACTION'} eq $Lang::tr{'remove'}) { - splice (@current,$settings{'KEY1'},1); # Delete line + splice (@current,$settings{'KEY1'},1); # Delete line open(FILE, ">$datafile") or die 'Unable to open aliases file.'; print FILE @current; close(FILE); @@ -291,7 +291,7 @@ if ($ENV{'QUERY_STRING'} =~ /$sortstring/ ) { if ($settings{'ACTION'} eq '' ) { # First launch from GUI $settings{'ENABLED'} ='on'; } - + &Header::openpage($Lang::tr{'external aliases configuration'}, 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); my %checked =(); # Checkbox manipulations @@ -314,7 +314,7 @@ END ; &Header::closebox(); } - + # # Second check box is for editing the list # @@ -406,7 +406,7 @@ foreach my $line (@current) { $gdesc = $Lang::tr{'click to disable'}; } else { $gif = 'off.gif'; - $gdesc = $Lang::tr{'click to enable'}; + $gdesc = $Lang::tr{'click to enable'}; } #Colorize each line @@ -488,7 +488,7 @@ END sub SortDataFile { our %entries = (); - + # Sort pair of record received in $a $b special vars. # When IP is specified use numeric sort else alpha. # If sortname ends with 'Rev', do reverse sort. @@ -527,27 +527,27 @@ sub SortDataFile foreach my $line (@current) { chomp( $line); #remove newline because can be on field 5 or 6 (addition of REMARK) my @temp = split (',',$line); - + # Build a pair 'Field Name',value for each of the data dataline. # Each SORTABLE field must have is pair. # Other data fields (non sortable) can be grouped in one - + # Exemple # F1,F2,F3,F4,F5 only F1 F2 for sorting # my @record = ('KEY',$key++, # 'F1',$temp[0], # 'F2',$temp[1], # 'DATA',join(',',@temp[2..4]) ); #group remainning values, with separator (,) - + # The KEY,key record permits doublons. If removed, then F1 becomes the key without doublon permitted. - - + + my @record = ('KEY',$key++,'IP',$temp[0],'ENABLED',$temp[1],'NAME',$temp[2]); my $record = {}; # create a reference to empty hash %{$record} = @record; # populate that hash with @record $entries{$record->{KEY}} = $record; # add this to a hash of hashes } - + open(FILE, ">$datafile") or die 'Unable to open aliases file.'; # Each field value is printed , with the newline ! Don't forget separator and order of them. @@ -562,7 +562,7 @@ sub SortDataFile close (FILE); } -# +# # Build the configuration file for application aliases # sub BuildConfiguration { diff --git a/html/cgi-bin/atm-status.cgi b/html/cgi-bin/atm-status.cgi index 49f19209d1..fb38dc0304 100644 --- a/html/cgi-bin/atm-status.cgi +++ b/html/cgi-bin/atm-status.cgi @@ -53,18 +53,18 @@ foreach (@modems){ my $value= `cat /sys/class/atm/$modem/parameters/$param`; chomp($param); chomp($value); - if (!($param =~"uevent") + if (!($param =~"uevent") && !($param =~"resource") && !($param eq "") ) { - + $lines++; if ($lines % 2){ print ""; }else{ print ""; } - print "$param$value "; + print "$param$value "; } } my @pfile = `grep . /sys/class/atm/$modem/device/* 2>/dev/null`; @@ -74,8 +74,8 @@ foreach (@modems){ my $value= `cat /sys/class/atm/$modem/device/$param`; chomp($param); chomp($value); - if (!($param =~"uevent") - && !($param =~"modalias") + if (!($param =~"uevent") + && !($param =~"modalias") && !($param =~"bInterface") && !($param =~"bAlternateSetting") && !($param =~"bNumEndpoints") @@ -83,14 +83,14 @@ foreach (@modems){ && !($param =~"resource") && !($param eq "") ) { - + $lines++; if ($lines % 2){ print ""; }else{ print ""; } - print "$param$value "; + print "$param$value "; } } print "
\n"; diff --git a/html/cgi-bin/chpasswd.cgi b/html/cgi-bin/chpasswd.cgi index 0a66062edb..4930c4ca3d 100644 --- a/html/cgi-bin/chpasswd.cgi +++ b/html/cgi-bin/chpasswd.cgi @@ -240,7 +240,7 @@ sub readhash { $val =~ s/^\'//g; $val =~ s/\'$//g; - + # Untaint variables read from hash $var =~ /([A-Za-z0-9_-]*)/; $var = $1; $val =~ /([\w\W]*)/; $val = $1; diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 10ac8748c0..7f06a55945 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -57,7 +57,7 @@ if (length ($ENV{'QUERY_STRING'}) > 0){ ($name, $value) = split(/=/, $pair); $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; # e.g. "%20" => " " $value =~ s/[^a-zA-Z0-9]*//g; # a-Z 0-9 will pass - $cgiin{$name} = $value; + $cgiin{$name} = $value; } } @@ -96,8 +96,8 @@ if ( $cgiin{'sort_field'} ~~ [ '1','2','3','4','5','6','7','8','9' ] ) { } # Read and sort the connection tracking table -# do sorting -if ($SORT_FIELD and $SORT_ORDER) { +# do sorting +if ($SORT_FIELD and $SORT_ORDER) { # field sorting when sorting arguments are sane open(CONNTRACK, "/usr/local/bin/getconntracktable | /usr/local/bin/consort.sh $SORT_FIELD $SORT_ORDER |") or die "Unable to read conntrack table"; } else { @@ -247,13 +247,13 @@ if (-e "${General::swroot}/ovpn/settings") { # Add OpenVPN net for custom OVPNs if (-e "${General::swroot}/ovpn/ccd.conf") { - open(OVPNSUB, "${General::swroot}/ovpn/ccd.conf"); + open(OVPNSUB, "${General::swroot}/ovpn/ccd.conf"); my @ovpnsub = ; close(OVPNSUB); foreach (@ovpnsub) { my ($network, $mask) = split '/', (split ',', $_)[2]; - + $mask = ipv4_cidr2msk($mask) unless &General::validip($mask); push(@network, $network); diff --git a/html/cgi-bin/connscheduler.cgi b/html/cgi-bin/connscheduler.cgi index 1393df65fd..cc78cbc1bd 100644 --- a/html/cgi-bin/connscheduler.cgi +++ b/html/cgi-bin/connscheduler.cgi @@ -138,7 +138,7 @@ if ( $cgiparams{'ACTION'} eq 'toggle' ) { $CONNSCHED::config[$cgiparams{'ID'}]{'ACTIVE'} = 'on'; } - + &CONNSCHED::WriteConfig; } @@ -194,7 +194,7 @@ if ( ($cgiparams{'ACTION'} eq 'add') || ($cgiparams{'ACTION'} eq 'update') ) if ( $cgiparams{'ACTION'} eq 'edit' ) { $i = $cgiparams{'ID'}; - + $selected_hour = substr($CONNSCHED::config[$i]{'TIME'},0,2); $selected_minute = substr($CONNSCHED::config[$i]{'TIME'},3,2); @@ -412,7 +412,7 @@ END my $col=""; for my $id ( 0 .. $#CONNSCHED::config ) { - if ( ($cgiparams{'ACTION'} eq 'edit') && ($id == $cgiparams{'ID'}) ) + if ( ($cgiparams{'ACTION'} eq 'edit') && ($id == $cgiparams{'ID'}) ) { print ""; $col="bgcolor='${Header::colouryellow}'"; @@ -422,7 +422,7 @@ for my $id ( 0 .. $#CONNSCHED::config ) print ""; $col="bgcolor='$color{'color20'}'"; } - else + else { print ""; $col="bgcolor='$color{'color22'}'"; diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index f1fbfd2358..0a0a21d68c 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -47,7 +47,7 @@ my $warnNTPmessage = ''; my @nosaved=(); my %color = (); -#Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS +#Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address'; &Header::showhttpheaders(); @@ -153,14 +153,14 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'}; goto ERROR; } - if (! &General::IpInSubnet ( $dhcpsettings{"START_ADDR_${itf}"}, + if (! &General::IpInSubnet ( $dhcpsettings{"START_ADDR_${itf}"}, $netsettings{"${itf}_NETADDRESS"}, $netsettings{"${itf}_NETMASK"})) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid start address'}; goto ERROR; } } - + if ($dhcpsettings{"END_ADDR_${itf}"}) { if (!(&General::validip($dhcpsettings{"END_ADDR_${itf}"}))) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'}; @@ -170,9 +170,9 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid start address'}; goto ERROR; } - if (! &General::IpInSubnet ( $dhcpsettings{"END_ADDR_${itf}"}, + if (! &General::IpInSubnet ( $dhcpsettings{"END_ADDR_${itf}"}, $netsettings{"${itf}_NETADDRESS"}, - $netsettings{"${itf}_NETMASK"})) { + $netsettings{"${itf}_NETMASK"})) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'}; goto ERROR; } @@ -214,7 +214,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) { goto ERROR; } if (! $dhcpsettings{"DNS1_${itf}"}) { - $errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary dns without specifying primary'}; + $errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary dns without specifying primary'}; goto ERROR; } } @@ -233,7 +233,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) { if (! $dhcpsettings{"WINS1_${itf}"} ) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary wins without specifying primary'}; goto ERROR; - } + } } if ($dhcpsettings{"NEXT_${itf}"}) { if (!(&General::validip($dhcpsettings{"NEXT_${itf}"}))) { @@ -295,14 +295,14 @@ if ($ENV{'QUERY_STRING'} =~ /^FETHER|^FIPADDR/ ) { &General::writehash($setting, \%dhcpsettings); &sortcurrent2; $dhcpsettings{'ACTION'} = 'SORT'; # create an 'ACTION' - map ($dhcpsettings{$_} = '',@nosaved,'KEY1','KEY2');# and reinit vars to empty + map ($dhcpsettings{$_} = '',@nosaved,'KEY1','KEY2');# and reinit vars to empty } #Sorting of allocated leases &Header::CheckSortOrder; -## Now manipulate the two multi-line list with Settings2. +## Now manipulate the two multi-line list with Settings2. # '1' suffix is for ADVANCED OPTIONS # '2' suffix is for FIXED LEASES @@ -319,12 +319,12 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'toggle enable disable'}.'1') { open(FILE, ">$filename1") or die 'Unable to open dhcp advanced options file.'; print FILE @current1; close(FILE); - + #Write changes to dhcpd.conf. &buildconf; } - + if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' && $dhcpsettings{'SUBMIT'} ne $Lang::tr{'dhcp advopt help'}) { @@ -334,7 +334,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' && if ($dhcpsettings{'ADVOPT_DATA'} eq '') { $errormessage=$Lang::tr{'dhcp advopt blank value'}; } - + # Test for a new option definition string (join field name & data) if (ExistNewOptionDefinition ($dhcpsettings{'ADVOPT_NAME'} . ' ' . $dhcpsettings{'ADVOPT_DATA'})) { #only edit permitted if option definition exists @@ -352,7 +352,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' && } unless ($errormessage) { - + my $scope = ''; foreach my $itf (@ITFs) { # buils "RED,GREEN,ORANGE,... based on selection $scope .= $dhcpsettings{"ADVOPT_SCOPE_${itf}"} eq 'on' ? "\t$itf" : "\toff" ; @@ -387,7 +387,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'edit'}.'1') { if ($itf ne 'off') # Only is an interface name is read { $dhcpsettings{"ADVOPT_SCOPE_${itf}"} = 'on'; - } + } } } @@ -416,7 +416,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'toggle enable disable'}.'2') { open(FILE, ">$filename2") or die 'Unable to open fixed leases file.'; print FILE @current2; close(FILE); - + #Write changes to dhcpd.conf. &buildconf; } @@ -428,7 +428,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') { if ($dhcpsettings{'FIX_NEXTADDR'}) { unless(&General::validip($dhcpsettings{'FIX_NEXTADDR'})) { $errormessage = $Lang::tr{'invalid fixed ip address'}; } } - + my $key = 0; CHECK:foreach my $line (@current2) { my @temp = split(/\,/,$line); @@ -438,13 +438,13 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') { # Also it may be needed to put duplicate fixed lease in their right subnet definition.. foreach my $itf (@ITFs) { my $scoped = &General::IpInSubnet($dhcpsettings{'FIX_ADDR'}, - $netsettings{"${itf}_NETADDRESS"}, + $netsettings{"${itf}_NETADDRESS"}, $netsettings{"${itf}_NETMASK"}) && $dhcpsettings{"ENABLE_${itf}"} eq 'on'; if ( $scoped && (lc($dhcpsettings{'FIX_MAC'}) eq lc($temp[0])) && &General::IpInSubnet($temp[1], - $netsettings{"${itf}_NETADDRESS"}, + $netsettings{"${itf}_NETADDRESS"}, $netsettings{"${itf}_NETMASK"})) { $errormessage = "$Lang::tr{'mac address in use'} $dhcpsettings{'FIX_MAC'}"; last CHECK; @@ -755,10 +755,10 @@ print <" : "disabled='disabled' />"; print "   "; @@ -812,7 +812,7 @@ if ($dhcpsettings{'SUBMIT'} eq $Lang::tr{'dhcp advopt help'}) { print 'wpadcode 252=text'; print 'wpad"http://www.server.fr/path-to/proxy.pac"'; print ''; - + } print <"; } else { - print ""; + print ""; } print < 1) { + if ($macdupl{$temp[0]} > 1) { $ipdup = 1; # Flag up duplicates for use later } $ipinuse{$temp[1]} += 1; - if ($ipinuse{$temp[1]} > 1) { + if ($ipinuse{$temp[1]} > 1) { $ipdup = 1; # Flag up duplicates for use later } # Mark IP addresses outwith known subnets $ipoutside{$temp[1]} = 1; foreach my $itf (@ITFs) { if ( &General::IpInSubnet($temp[1], - $netsettings{"${itf}_NETADDRESS"}, + $netsettings{"${itf}_NETADDRESS"}, $netsettings{"${itf}_NETMASK"})) { $ipoutside{$temp[1]} = 0; } @@ -1055,7 +1055,7 @@ foreach my $line (@current2) { $gdesc = $Lang::tr{'click to disable'}; } else { $gif = 'off.gif'; - $gdesc = $Lang::tr{'click to enable'}; + $gdesc = $Lang::tr{'click to enable'}; } # Skip all entries that do not match the search query @@ -1081,15 +1081,15 @@ foreach my $line (@current2) { my $TAG2 = ''; my $TAG3 = ''; my $TAG4 = ''; - if ($ipinuse{$temp[1]} > 1) { + if ($ipinuse{$temp[1]} > 1) { $TAG0 = ''; $TAG1 = ''; } - if ($macdupl{$temp[0]} > 1) { + if ($macdupl{$temp[0]} > 1) { $TAG2 = ''; $TAG3 = ''; } - if ($ipoutside{$temp[1]} > 0) { + if ($ipoutside{$temp[1]} > 0) { $TAG4 = "bgcolor='orange'" if ($dhcpsettings{'KEY2'} ne $key); } @@ -1230,7 +1230,7 @@ sub sortcurrent2 # use combination of ether & IP as key to allow duplicates in either but not both $entries{$record->{FETHER} . $record->{FIPADDR}} = $record; # add this to a hash of hashes } - + open(FILE, ">$filename2") or die 'Unable to open fixed lease file.'; foreach my $entry ( sort fixedleasesort keys %entries) { print FILE "$entries{$entry}->{FETHER},$entries{$entry}->{FIPADDR},$entries{$entry}->{DATA}\n"; @@ -1243,7 +1243,7 @@ sub sortcurrent2 close (FILE); undef (%entries); #This array is reused latter. Clear it. } - + # Build the configuration file mixing settings, fixed leases and advanced options sub buildconf { open(FILE, ">/${General::swroot}/dhcp/dhcpd.conf") or die "Unable to write dhcpd.conf file"; @@ -1263,7 +1263,7 @@ sub buildconf { } else { print FILE "ddns-update-style none;\n"; } - + # Write first new option definition foreach my $line (@current1) { chomp($line); # remove newline @@ -1276,7 +1276,7 @@ sub buildconf { foreach my $line (@current1) { chomp($line); # remove newline my @temp = split(/\t/,$line); - + if ($temp[0] eq 'on' && !ExistNewOptionDefinition ($temp[1] . ' ' . $temp[2])){ # active & !definition my $global=1; for (my $key=0; $key<@ITFs; $key++) { @@ -1289,7 +1289,7 @@ sub buildconf { if ($global) { print FILE "option $temp[1] $temp[2];\n"; } - }# on + }# on }# foreach line print FILE "\n"; @@ -1329,7 +1329,7 @@ sub buildconf { foreach my $line (@current1) { chomp($line); # remove newline my @temp = split(/\t/,$line); # Use TAB separator ! - + if ($temp[0] eq 'on'){ for (my $key=0; $key<@ITFs; $key++) { if ($itf eq $temp[3+$key]) # Only is an interface name is read @@ -1337,7 +1337,7 @@ sub buildconf { print FILE "\toption $temp[1] $temp[2];\n"; } } - }# on + }# on }# foreach line print FILE "} #$itf\n\n"; diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi index e2843a81f9..4af5ed2005 100644 --- a/html/cgi-bin/dnsforward.cgi +++ b/html/cgi-bin/dnsforward.cgi @@ -18,7 +18,7 @@ # along with this program. If not, see . # # # ############################################################################### - + use strict; # enable only the following on debugging purpose diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index 154efd7b28..36c0efc2ef 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -100,8 +100,8 @@ END ; &General::system("/usr/local/bin/extrahdctrl", "mount", "$extrahdsettings{'PATH'}"); } -} -elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'}) +} +elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'}) { if ( &General::system("/usr/local/bin/extrahdctrl", "umount", "$extrahdsettings{'PATH'}")) { open( FILE, "< $devicefile" ) or die "Unable to read $devicefile"; diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 1341f52095..681d427700 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -100,7 +100,7 @@ my @protocols; &General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color); -&General::readhash($fwoptions, \%optionsfw); +&General::readhash($fwoptions, \%optionsfw); &General::readhash($ifacesettings, \%ifaces); &General::readhash("$configovpn", \%ovpnsettings); &General::readhash("$configipsecrw", \%ipsecsettings); @@ -554,7 +554,7 @@ sub checksource if (&General::validport($_)){ push (@values,$_); }else{ - + } } } @@ -836,7 +836,7 @@ sub checkrule if (&General::validport($_)){ push (@values,$_); }else{ - + } } } @@ -974,16 +974,16 @@ sub checkvpn # A Test if manual ip is part of dynamic openvpn subnet is made in getcolor # because if one creates a custom host with the ip, we need to check the color there! # It does not make sense to check this here - + # Test if manual IP is part of an OpenVPN N2N subnet does also not make sense here # Is also checked in getcolor - + # Test if manual ip is part of an IPsec Network is also checked in getcolor return 1; } sub checkvpncolor { - + } sub deleterule { @@ -1247,7 +1247,7 @@ END print"$Lang::tr{'fwhost ipsec net'}"; } if ($show eq '1'){$show='';print"";} - + print""; print"
"; } @@ -1585,10 +1585,10 @@ sub newrule $fwdfwsettings{'RULE_ACTION'} = $hash{$key}[0]; $fwdfwsettings{'chain'} = $hash{$key}[1]; $fwdfwsettings{'ACTIVE'} = $hash{$key}[2]; - $fwdfwsettings{'grp1'} = $hash{$key}[3]; - $fwdfwsettings{$fwdfwsettings{'grp1'}} = $hash{$key}[4]; - $fwdfwsettings{'grp2'} = $hash{$key}[5]; - $fwdfwsettings{$fwdfwsettings{'grp2'}} = $hash{$key}[6]; + $fwdfwsettings{'grp1'} = $hash{$key}[3]; + $fwdfwsettings{$fwdfwsettings{'grp1'}} = $hash{$key}[4]; + $fwdfwsettings{'grp2'} = $hash{$key}[5]; + $fwdfwsettings{$fwdfwsettings{'grp2'}} = $hash{$key}[6]; $fwdfwsettings{'USE_SRC_PORT'} = $hash{$key}[7]; $fwdfwsettings{'PROT'} = $hash{$key}[8]; $fwdfwsettings{'ICMP_TYPES'} = $hash{$key}[9]; @@ -1695,7 +1695,7 @@ sub newrule if ( &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){ $fwdfwsettings{'oldorange'} ='on'; } - } + } } # Split manual source and target address and delete the subnet my ($sip,$scidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp1'}}); @@ -1811,7 +1811,7 @@ END #---TARGET------------------------------------------------------ &Header::openbox('100%', 'left', $Lang::tr{'fwdfw target'}); print< + END print""; if($fwdfwsettings{'updatefwrule'} eq 'on' || $fwdfwsettings{'copyfwrule'} eq 'on'){ print "
$Lang::tr{'fwdfw targetip'}Firewall
$Lang::tr{'remark'}:
$Lang::tr{'fwdfw rulepos'}: END @@ -2590,7 +2590,7 @@ END $color="$color{'color14'}"; $coloryellow=''; }elsif($coloryellow eq ''){ - if ($count % 2){ + if ($count % 2){ $color="$color{'color22'}"; } else{ diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index c66e3002a3..baf745a0a2 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -145,7 +145,7 @@ if ($fwhostsettings{'ACTION'} eq 'updatenet' ) $fwhostsettings{'netremark'} = $customnetwork{$key}[3]; $fwhostsettings{'count'} = $customnetwork{$key}[4]; delete $customnetwork{$key}; - + } } &General::writehasharray("$confignet", \%customnetwork); @@ -284,7 +284,7 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' ) #convert ip if leading '0' exists $fwhostsettings{'IP'} = &Network::ip_remove_zero($fwhostsettings{'IP'}); - #check valid ip + #check valid ip if (!&General::validipandmask($fwhostsettings{'IP'}."/".$fwhostsettings{'SUBNET'})) { $errormessage=$errormessage.$Lang::tr{'fwhost err addr'}; @@ -448,7 +448,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost') } } #only check plausi when no error till now - if (!$errormessage){ + if (!$errormessage){ &plausicheck("edithost"); } if($fwhostsettings{'actualize'} eq 'on' && $fwhostsettings{'newhost'} ne 'on' && $errormessage){ @@ -465,7 +465,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost') $customhost{$key}[3] = $fwhostsettings{'orgremark'}; &General::writehasharray("$confighost", \%customhost); undef %customhost; - } + } if (!$errormessage){ #get count if host was edited if($fwhostsettings{'actualize'} eq 'on'){ @@ -560,7 +560,7 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp') #check standard networks if ($fwhostsettings{'grp2'} eq 'std_net'){ @target=$fwhostsettings{'DEFAULT_SRC_ADR'}; - $type='Standard Network'; + $type='Standard Network'; } #check custom networks if ($fwhostsettings{'grp2'} eq 'cust_net' && $fwhostsettings{'CUST_SRC_NET'} ne ''){ @@ -626,7 +626,7 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp') $fwhostsettings{'remark'}=''; } #check if host/net exists in grp - + my $test="$grp,$fwhostsettings{'oldremark'},@target,$type"; foreach my $key (keys %customgrp) { my $test1="$customgrp{$key}[0],$customgrp{$key}[1],$customgrp{$key}[2],$customgrp{$key}[3]"; @@ -636,7 +636,7 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp') } } } - + if (!$errormessage){ #on first save, we have an empty @target, so fill it with nothing my $targetvalues=@target; @@ -1168,7 +1168,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegrpremark') { $customgrp{$key}[1]=''; $customgrp{$key}[1]=$fwhostsettings{'newrem'}; - } + } } &General::writehasharray("$configgrp", \%customgrp); $fwhostsettings{'update'}='on'; @@ -1218,7 +1218,7 @@ if ($fwhostsettings{'ACTION'} eq 'changesrvgrpremark') { $customservicegrp{$key}[1]=''; $customservicegrp{$key}[1]=$fwhostsettings{'newsrvrem'}; - } + } } &General::writehasharray("$configsrvgrp", \%customservicegrp); $fwhostsettings{'updatesrvgrp'}='on'; @@ -1323,7 +1323,7 @@ sub showmenu {
END &Header::closebox(); - + } # Add sub addnet @@ -1367,11 +1367,11 @@ END if ($fwhostsettings{'ACTION'} eq 'edithost' || $fwhostsettings{'error'} eq 'on') { - + print " "; }else{ print " "; - } + } print "
"; &Header::closebox(); } @@ -1397,7 +1397,7 @@ sub addgrp $fwhostsettings{'oldgrpname'}=$fwhostsettings{'grp_name'}; my $grp=$fwhostsettings{'grp_name'}; my $rem=$fwhostsettings{'remark'}; - if ($fwhostsettings{'update'} eq ''){ + if ($fwhostsettings{'update'} eq ''){ print< @@ -1869,9 +1869,9 @@ sub viewtablenet &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout); - if (!keys %customnetwork) - { - print "
$Lang::tr{'fwhost empty'}"; + if (!keys %customnetwork) + { + print "
$Lang::tr{'fwhost empty'}"; }else{ print< @@ -1885,7 +1885,7 @@ END print" "; $col="bgcolor='${Header::colouryellow}'"; }elsif ($count % 2) - { + { $col="bgcolor='$color{'color20'}'"; print" "; }else @@ -1915,7 +1915,7 @@ END } print""; &Header::closebox(); - } + } } sub getcolor @@ -2015,9 +2015,9 @@ sub viewtablehost &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout); &General::readhasharray("$configgrp", \%customgrp); - if (!keys %customhost) - { - print "
$Lang::tr{'fwhost empty'}"; + if (!keys %customhost) + { + print "
$Lang::tr{'fwhost empty'}"; }else{ print< @@ -2085,7 +2085,7 @@ sub viewtablegrp my $delflag; my @counter; my %hash; - if (!keys %customgrp) + if (!keys %customgrp) { print "
$Lang::tr{'fwhost err emptytable'}"; }else{ @@ -2136,7 +2136,7 @@ sub viewtablegrp print""; $col="bgcolor='$color{'color22'}'"; } - my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]); + my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]); if ($ip eq ''){ print""; $col="bgcolor='${Header::colouryellow}'"; @@ -2548,7 +2548,7 @@ sub checkname } } return 1; - + } sub checkgroup { @@ -2574,7 +2574,7 @@ sub checkservice } sub checkip { - + my %hash=%{(shift)}; my $a=shift; foreach my $key (keys %hash) { @@ -2603,7 +2603,7 @@ sub checkservicegroup foreach my $key (keys %customservicegrp) { if( $customservicegrp{$key}[0] eq $fwhostsettings{'SRVGRP_NAME'} ){ $errormessage.=$Lang::tr{'fwhost err grpexist'}."
"; - + } } } @@ -2667,7 +2667,7 @@ sub get_name foreach my $network (sort keys %defaultNetworks) { return "$network" if ($val eq $defaultNetworks{$network}{'NAME'}); - } + } } sub gethostcount { @@ -2827,7 +2827,7 @@ sub deletefromgrp } } &General::writehasharray("$config",\%hash); - + } sub plausicheck { @@ -2893,13 +2893,13 @@ sub plausicheck $errormessage=$errormessage."
".$Lang::tr{'fwhost err netexist'}; $fwhostsettings{'HOSTNAME'} = $fwhostsettings{'orgname'}; if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;} - } - #check if network ip already exists + } + #check if network ip already exists if (!&checkip(\%customnetwork,1)) { $errormessage=$errormessage."
".$Lang::tr{'fwhost err net'}; if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;} - } + } #check if host with this name already exists &General::readhasharray("$confighost", \%customhost); if (!&checkname(\%customhost)) @@ -2920,7 +2920,7 @@ sub getipforgroup my $name=$_[0], my $type=$_[1]; my $value; - + #get address from IPSEC NETWORK if ($type eq 'IpSec Network'){ foreach my $key (keys %ipsecconf) { @@ -2946,7 +2946,7 @@ sub getipforgroup } &deletefromgrp($name,$configgrp); } - + #get address from IPSEC HOST if ($type eq 'IpSec Host'){ foreach my $key (keys %ipsecconf) { @@ -2956,7 +2956,7 @@ sub getipforgroup } &deletefromgrp($name,$configgrp); } - + #get address from ovpn ccd Net-2-Net if ($type eq 'OpenVPN N-2-N'){ foreach my $key (keys %ccdhost) { @@ -2968,7 +2968,7 @@ sub getipforgroup } &deletefromgrp($name,$configgrp); } - + #get address from ovpn ccd static host if ($type eq 'OpenVPN static host'){ foreach my $key (keys %ccdhost) { @@ -2980,7 +2980,7 @@ sub getipforgroup } &deletefromgrp($name,$configgrp); } - + #get address from ovpn ccd static net if ($type eq 'OpenVPN static network'){ foreach my $key (keys %ccdnet) { @@ -2991,7 +2991,7 @@ sub getipforgroup } } } - + #check custom addresses if ($type eq 'Custom Host'){ foreach my $key (keys %customhost) { @@ -3001,7 +3001,7 @@ sub getipforgroup } } } - + ##check custom networks if ($type eq 'Custom Network'){ foreach my $key (keys %customnetwork) { @@ -3010,7 +3010,7 @@ sub getipforgroup } } } - + #check standard networks if ($type eq 'Standard Network'){ if ($name =~ /OpenVPN/i){ @@ -3060,7 +3060,7 @@ sub decrease } } } - + if (($customgrp{$key}[0] eq $grp) && ($customgrp{$key}[3] eq 'Custom Host')){ foreach my $key2 (sort keys %customhost){ if ($customhost{$key2}[0] eq $customgrp{$key}[2]){ @@ -3068,7 +3068,7 @@ sub decrease last; } } - + } } &General::writehasharray("$confignet", \%customnetwork); @@ -3079,7 +3079,7 @@ sub decreaseservice my $grp=$_[0]; &General::readhasharray("$configsrv", \%customservice); &General::readhasharray("$configsrvgrp", \%customservicegrp); - + foreach my $key (sort keys %customservicegrp){ if ($customservicegrp{$key}[0] eq $grp ){ foreach my $key2 (sort keys %customservice){ @@ -3090,7 +3090,7 @@ sub decreaseservice } } &General::writehasharray("$configsrv", \%customservice); - + } sub changenameinfw { @@ -3130,7 +3130,7 @@ sub changenameinfw } sub checkports { - + my %hash=%{(shift)}; #check empty fields if ($fwhostsettings{'SRV_NAME'} eq '' ){ @@ -3145,7 +3145,7 @@ sub checkports } #change dashes with : $fwhostsettings{'SRV_PORT'}=~ tr/-/:/; - + if ($fwhostsettings{'SRV_PORT'} eq "*") { $fwhostsettings{'SRV_PORT'} = "1:65535"; } diff --git a/html/cgi-bin/getrrdimage.cgi b/html/cgi-bin/getrrdimage.cgi index 26bcf09051..26e026bba9 100644 --- a/html/cgi-bin/getrrdimage.cgi +++ b/html/cgi-bin/getrrdimage.cgi @@ -52,8 +52,8 @@ my $range = lc $query{'range'}; # lower case unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~ @Graphs::time_ranges)) { # Send HTTP headers _start_svg_output(); - - _print_error("URL parameters missing or malformed."); + + _print_error("URL parameters missing or malformed."); exit; } @@ -62,13 +62,13 @@ unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~ unless(($origin ~~ @supported_origins) || ($origin eq "getrrdimage.cgi")) { # Rewrite to old URL format: /[graph origin cgi]?[graph name]?[time range] my $location = "https://$ENV{'SERVER_NAME'}:$ENV{'SERVER_PORT'}/cgi-bin/${origin}?${graph}?${range}"; - + # Send HTTP redirect print "Status: 302 Found\n"; print "Location: $location\n"; print "Content-type: text/html; charset=UTF-8\n"; print "\n"; # End of HTTP headers - + print "Unsupported origin, request redirected to '$location'"; exit; } diff --git a/html/cgi-bin/gpl.cgi b/html/cgi-bin/gpl.cgi index 140fd2178b..029b048e8c 100644 --- a/html/cgi-bin/gpl.cgi +++ b/html/cgi-bin/gpl.cgi @@ -57,7 +57,7 @@ print <
END -; +; if ( -e "/usr/share/doc/licenses/GPLv3" ) { print '$Lang::tr{'ccd iroutehint'}
$Lang::tr{'ccd iroute2'} DNS2: WINS:

- + END ; &Header::closebox(); @@ -5147,7 +5147,7 @@ END } } } - + #default setzen if ($cgiparams{'DCIPHER'} eq '') { $cgiparams{'DCIPHER'} = 'AES-256-CBC'; @@ -5275,8 +5275,8 @@ END $activeonrun = ""; } else { $activeonrun = "disabled='disabled'"; - } - &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'}); + } + &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'}); print <
@@ -5293,7 +5293,7 @@ END print "$Lang::tr{'ovpn on blue'}"; print ""; } - if (&haveOrangeNet()) { + if (&haveOrangeNet()) { print "$Lang::tr{'ovpn on orange'}"; print ""; } @@ -5310,7 +5310,7 @@ END $Lang::tr{'ovpn subnet'}
$Lang::tr{'protocol'} + $Lang::tr{'destination port'}: $Lang::tr{'MTU'}  @@ -5363,12 +5363,12 @@ END

END -; - +; + if ( $srunning eq "yes" ) { print ""; print ""; - print ""; + print ""; print ""; } else{ print ""; @@ -5378,13 +5378,13 @@ END -e "${General::swroot}/ovpn/ca/dh1024.pem" && -e "${General::swroot}/ovpn/certs/servercert.pem" && -e "${General::swroot}/ovpn/certs/serverkey.pem") && - (( $cgiparams{'ENABLED'} eq 'on') || + (( $cgiparams{'ENABLED'} eq 'on') || ( $cgiparams{'ENABLED_BLUE'} eq 'on') || ( $cgiparams{'ENABLED_ORANGE'} eq 'on'))){ print ""; } else { - print ""; - } + print ""; + } } print "
"; &Header::closebox(); @@ -5476,7 +5476,7 @@ END my @output = ""; my @tustate = ""; my $tport = $confighash{$key}[22]; - my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport); + my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport); if ($tport ne '') { $tnet->open('127.0.0.1'); @output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/'); @@ -5526,7 +5526,7 @@ END print <$active - +
@@ -5560,7 +5560,7 @@ END ; } else { print " "; } - if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/ovpn/certs/$confighash{$key}[1].p12") { + if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/ovpn/certs/$confighash{$key}[1].p12") { print < @@ -5929,7 +5929,7 @@ END - +

END ; diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index 8faf4490ca..0111a240b6 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -3606,7 +3606,7 @@ END print ASNBLFILE</dev/null"); } else { diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index e69dc425ab..109fc3e3e5 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -49,7 +49,7 @@ $settings{'IP'} = ''; $settings{'GATEWAY'} = ''; $settings{'REMARK'} = ''; my @nosaved=('EN','IP','GATEWAY','REMARK'); # List here ALL setting2 fields. Mandatory - + $settings{'ACTION'} = ''; # add/edit/remove $settings{'KEY1'} = ''; # point record for ACTION @@ -105,14 +105,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) { $temp[0] = $temp[0] ne '' ? '' : 'on'; # Toggle the field @current[$settings{'KEY1'}] = join (',',@temp)."\n"; $settings{'KEY1'} = ''; # End edit mode - + &General::log($Lang::tr{'routing config changed'}); #Save current open(FILE, ">$datafile") or die 'routing datafile error'; print FILE @current; close(FILE); - + # Rebuild configuration file &BuildConfiguration; } @@ -174,7 +174,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) { # Write changes to config file. &SortDataFile; # sort newly added/modified entry &BuildConfiguration; # then re-build routing - + #map ($settings{$_}='' ,@nosaved); # Clear fields } } @@ -192,7 +192,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) { } if ($settings{'ACTION'} eq $Lang::tr{'remove'}) { - splice (@current,$settings{'KEY1'},1); # Delete line + splice (@current,$settings{'KEY1'},1); # Delete line open(FILE, ">$datafile") or die 'route datafile error'; print FILE @current; close(FILE); @@ -315,7 +315,7 @@ foreach my $line (@current) { $gdesc = $Lang::tr{'click to disable'}; } else { $gif = 'off.gif'; - $gdesc = $Lang::tr{'click to enable'}; + $gdesc = $Lang::tr{'click to enable'}; } #Colorize each line @@ -405,7 +405,7 @@ if ( $output != "" ) { sub SortDataFile { our %entries = (); - + # Sort pair of record received in $a $b special vars. # When IP is specified use numeric sort else alpha. # If sortname ends with 'Rev', do reverse sort. @@ -449,13 +449,13 @@ sub SortDataFile # Build a pair 'Field Name',value for each of the data dataline. # Each SORTABLE field must have is pair. # Other data fields (non sortable) can be grouped in one - + my @record = ('KEY',$key++,'EN',$temp[0],'IP',$temp[1],'GATEWAY',$temp[2],'REMARK',$temp[3]); my $record = {}; # create a reference to empty hash %{$record} = @record; # populate that hash with @record $entries{$record->{KEY}} = $record; # add this to a hash of hashes } - + open(FILE, ">$datafile") or die 'routing datafile error'; # Each field value is printed , with the newline ! Don't forget separator and order of them. diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 9289b45193..0a3cd8c043 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -142,7 +142,7 @@ if ($sambasettings{'ACTION'} eq $Lang::tr{'save'}) { } &General::readhash("${General::swroot}/samba/settings", \%sambasettings); - + if ($errormessage) { @@ -759,7 +759,7 @@ sub isrunning { if (/^Name:\W+(.*)/) { - $testcmd = $1; + $testcmd = $1; } } close FILE; @@ -775,7 +775,7 @@ sub isrunning sub writeconfiguration() { open (FILE, ">${General::swroot}/samba/global") or die "Can't save the global settings: $!"; flock (FILE, 2); - + print FILE <$Lang::tr{'green'}"; -if (&haveBlueNet()) +if (&haveBlueNet()) { print ""; } -if (&haveOrangeNet()) +if (&haveOrangeNet()) { print ""; } @@ -269,7 +269,7 @@ print <\n"; print ""; @@ -309,12 +309,12 @@ for $i ( 0 .. $#wol_devices ) my $wol_iface = $wol_devices[$i]{'IFace'}; my $wol_txt = &Header::cleanhtml($wol_devices[$i]{'Comment'}); - if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) ) + if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) ) { print ""; $col="bgcolor='${Header::colouryellow}'"; } - elsif ( $i % 2) + elsif ( $i % 2) { print ""; $col="bgcolor='$color{'color20'}'"; @@ -332,7 +332,7 @@ for $i ( 0 .. $#wol_devices ) END ; - if ( (($wol_iface eq 'blue') && ! &haveBlueNet()) + if ( (($wol_iface eq 'blue') && ! &haveBlueNet()) || (($wol_iface eq 'orange') && ! &haveOrangeNet()) ) { # configured IFace (momentarily) not available -> now wakeup button/image @@ -384,7 +384,7 @@ sub ReadConfig { # datafileformat: # ID,MAC,IFACE,,Comment - # + # my @tmpfile = (); if ( open(FILE, "$datafile") ) { @@ -421,14 +421,14 @@ sub WriteConfig unless(&General::validmac($wol_devices[$i]{'MAC'})) { next; } unshift (@tmp_clients, uc($wol_devices[$i]{'MAC'}).",$wol_devices[$i]{'IFace'},,$wol_devices[$i]{'Comment'}"); } - + # sort tmp_clients on MAC @tmp_clients = sort ( @tmp_clients ); open(FILE, ">$datafile") or die 'hosts datafile error'; my $count = 0; - foreach $line (@tmp_clients) + foreach $line (@tmp_clients) { print FILE "$count,$line\n"; $count++; diff --git a/html/cgi-bin/webaccess.cgi b/html/cgi-bin/webaccess.cgi index 934fe6bebc..b819dd3096 100644 --- a/html/cgi-bin/webaccess.cgi +++ b/html/cgi-bin/webaccess.cgi @@ -82,7 +82,7 @@ if ((-e $svhosts_file) && (!-z $svhosts_file)) if (($cgiparams{'ACTION'} eq 'submit') && ($is_supervisor)) { - if ( ($cgiparams{'PASSWORD'} eq $proxysettings{'SUPERVISOR_PASSWORD'}) && (!($proxysettings{'SUPERVISOR_PASSWORD'} eq '')) || + if ( ($cgiparams{'PASSWORD'} eq $proxysettings{'SUPERVISOR_PASSWORD'}) && (!($proxysettings{'SUPERVISOR_PASSWORD'} eq '')) || ((defined($proxysettings{'SUPERVISOR_PASSWORD'})) && ($proxysettings{'SUPERVISOR_PASSWORD'} eq ''))) { &write_acl; @@ -269,7 +269,7 @@ sub readhash { $val =~ s/^\'//g; $val =~ s/\'$//g; - + # Untaint variables read from hash $var =~ /([A-Za-z0-9_-]*)/; $var = $1; $val =~ /([\w\W]*)/; $val = $1; diff --git a/html/cgi-bin/wireless.cgi b/html/cgi-bin/wireless.cgi index 35bdaaa605..27a2d9dd71 100644 --- a/html/cgi-bin/wireless.cgi +++ b/html/cgi-bin/wireless.cgi @@ -39,7 +39,7 @@ my %checked=(); my $errormessage = ''; my $filename = "${General::swroot}/wireless/config"; my $hostsfile = "${General::swroot}/main/hosts"; -our %dhcpsettings=(); +our %dhcpsettings=(); our %netsettings=(); $cgiparams{'ENABLED'} = 'off'; @@ -92,9 +92,9 @@ if ($cgiparams{'ACTION'} eq 'add') { $cgiparams{'SOURCE_IP'} = 'NONE'; } else { - unless(&General::validipormask($cgiparams{'SOURCE_IP'})) + unless(&General::validipormask($cgiparams{'SOURCE_IP'})) { - $errormessage = $Lang::tr{'invalid fixed ip address'}; + $errormessage = $Lang::tr{'invalid fixed ip address'}; goto ADDERROR; } } @@ -102,9 +102,9 @@ if ($cgiparams{'ACTION'} eq 'add') { $cgiparams{'SOURCE_MAC'} = 'NONE'; } else { - unless(&General::validmac($cgiparams{'SOURCE_MAC'})) - { - $errormessage = $Lang::tr{'invalid fixed mac address'}; + unless(&General::validmac($cgiparams{'SOURCE_MAC'})) + { + $errormessage = $Lang::tr{'invalid fixed mac address'}; } } @@ -323,7 +323,7 @@ foreach my $line (@current) } if ( $hname eq "" ) { my ($aliases, $addrtype, $length, @addrs); - ($hname, $aliases, $addrtype, $length, @addrs) = + ($hname, $aliases, $addrtype, $length, @addrs) = gethostbyaddr(pack("C4", split(/\./, $sourceip)), 2); } } diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi index 7cd23aed46..00d1779042 100644 --- a/html/cgi-bin/wirelessclient.cgi +++ b/html/cgi-bin/wirelessclient.cgi @@ -303,7 +303,7 @@ END $gdesc = $Lang::tr{'click to disable'}; } else { $gif = 'off.gif'; - $gdesc = $Lang::tr{'click to enable'}; + $gdesc = $Lang::tr{'click to enable'}; } # Colorize each line @@ -576,7 +576,7 @@ sub showEditBox() {

- + $Lang::tr{'wlan client advanced settings'}: diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 62f18e3086..07a1f51da3 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -67,7 +67,7 @@ my $extraHead = <= 1) && ($vlan_tag <= 4094)) { $VALIDATE_error = $Lang::tr{"zoneconf val vlan tag range error"}; @@ -507,7 +507,7 @@ END if ($access_selected{"NONE"} eq "") { $highlight = $_; } - + print <