Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 231181 Details for
Bug 319201
php errors in piranha made visible by display_errors = On in /etc/php.ini
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch
piranha-0.8.4-php.patch (text/plain), 4.29 KB, created by
Marek Grac
on 2007-10-18 16:36:36 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Marek Grac
Created:
2007-10-18 16:36:36 UTC
Size:
4.29 KB
patch
obsolete
>diff -ur piranha/web/web/secure/virtual_edit_real.php piranha.err/web/web/secure/virtual_edit_real.php >--- piranha/web/web/secure/virtual_edit_real.php 2003-07-10 19:15:01.000000000 +0200 >+++ piranha.err/web/web/secure/virtual_edit_real.php 2007-10-18 18:08:31.000000000 +0200 >@@ -1,7 +1,16 @@ > <?php >- $selected_host = $_GET['selected_host']; >- $selected = $_GET['selected']; >- if ($_GET['real_service'] == "CANCEL") { >+ $selected_host = ""; >+ $selected = ""; >+ >+ if (isset($_GET['selected_host'])) { >+ $selected_host = $_GET['selected_host']; >+ } >+ >+ if (isset($_GET['selected'])) { >+ $selected = $_GET['selected']; >+ } >+ >+ if ((isset($_GET['real_service'])) && ($_GET['real_service'] == "CANCEL")) { > /* Redirect browser to editing page */ > header("Location: virtual_edit_virt.php?selected_host=$selected_host"); > /* Make sure that code below does not get executed when we redirect. */ >@@ -9,7 +18,7 @@ > } > > /* Some magic used to allow the edit command to pull up another web page */ >- if ($_GET['real_service'] == "EDIT") { >+ if ((isset($_GET['real_service'])) && ($_GET['real_service'] == "EDIT")) { > /* Redirect browser to editing page */ > header("Location: virtual_edit_real_edit.php?selected_host=$selected_host&selected=$selected"); > /* Make sure that code below does not get executed when we redirect. */ >@@ -24,11 +33,11 @@ > > require('parse.php'); > >- if ($_GET['real_service'] == "ADD") { >+ if ((isset($_GET['real_service'])) && ($_GET['real_service'] == "ADD")) { > add_service($selected_host); > } > >- if ($_GET['real_service'] == "DELETE") { >+ if ((isset($_GET['real_service'])) && ($_GET['real_service'] == "DELETE")) { > if ($debug) { echo "About to delete entry number $selected_host<BR>"; } > echo "<HR><H2>Click <A HREF=\"virtual_edit_real.php?selected_host=$selected_host\" NAME=\"Virtual\">HERE</A></TD> for refresh</H2><HR>"; > open_file("w+"); >@@ -36,7 +45,7 @@ > exit; > } > >- if ($_GET['real_service'] == "(DE)ACTIVATE") { >+ if ((isset($_GET['real_service'])) && ($_GET['real_service'] == "(DE)ACTIVATE")) { > switch ($serv[$selected_host][$selected]['active']) { > case "" : $serv[$selected_host][$selected]['active'] = "0"; break; > case "0" : $serv[$selected_host][$selected]['active'] = "1"; break; >@@ -156,7 +165,7 @@ > <TD CLASS="title">STATUS</TD> > <TD CLASS="title">NAME</TD> > <TD CLASS="title">ADDRESS</TD> >-<?php// <TD CLASS="title">NETMASK</TD> </?> >+<?php // <TD CLASS="title">NETMASK</TD> ?> > </TR> > > <!-- Somehow dynamically generated here --> >@@ -167,7 +176,8 @@ > echo "<INPUT TYPE=HIDDEN NAME=virtual VALUE=$selected_host>"; > > $loop=1; >- while ($serv[$selected_host][$loop]['server'] != "" ) { >+ >+ while ((isset($serv[$selected_host][$loop]['server'])) && ($serv[$selected_host][$loop]['server'] != "" )) { > echo "<TR>"; > echo "<TD><INPUT TYPE=RADIO NAME=selected VALUE=" . $loop; if ($selected == "" ) { $selected = 1; }; if ($loop == $selected) { echo " CHECKED"; }; echo "></TD>"; > echo "<TD><INPUT TYPE=HIDDEN NAME=active COLS=6 VALUE="; >diff -ur piranha/web/web/secure/virtual_edit_services.php piranha.err/web/web/secure/virtual_edit_services.php >--- piranha/web/web/secure/virtual_edit_services.php 2003-07-10 19:15:01.000000000 +0200 >+++ piranha.err/web/web/secure/virtual_edit_services.php 2007-10-18 18:08:31.000000000 +0200 >@@ -126,6 +126,13 @@ > // echo "<PRE>[" . $virt[$selected_host]['expect_program'] . "] [$expect_program]</PRE><BR>"; > > /* php escapes \n to \\n ! argh! { fortunately there is stripslashes(); */ >+ $lst = array ("send", "expect", "start_cmd", "stop_cmd", "send_program", "expect_program", "use_regex"); >+ foreach ($lst as $i) { >+ if (!isset($_GET[$i])) { >+ $_GET[$i] = ""; >+ } >+ } >+ > $send = stripslashes($_GET['send']); > $expect = stripslashes($_GET['expect']); > $start_cmd = stripslashes($_GET['start_cmd']); >diff -ur piranha/web/web/secure/virtual_main.php piranha.err/web/web/secure/virtual_main.php >--- piranha/web/web/secure/virtual_main.php 2005-02-08 09:04:20.000000000 +0100 >+++ piranha.err/web/web/secure/virtual_main.php 2007-10-18 18:08:31.000000000 +0200 >@@ -213,8 +213,11 @@ > > echo $virt[$loop1]['protocol']; > echo "</TD>"; >+ >+ if (! isset($temp[1])) { >+ $temp[1] = ""; >+ } > >- > echo "<TD><INPUT TYPE=HIDDEN NAME=interface SIZE=16 COLS=10 VALUE=" . $temp[1] . ">"; > echo $temp[1] . "</TD>"; > echo "</TR>";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 319201
: 231181