mbox

pppsetup.cgi: Fix site layout when no TYPE is specified

Message ID 1445171150-4433-1-git-send-email-stefan.schantl@ipfire.org
State Accepted
Commit 609b862fe7c58c3d61244888c1f7a98cb7da66cb
Headers

Message

Stefan Schantl Oct. 18, 2015, 11:25 p.m. UTC
  There was an issue with false generated HTML code, in case
of an empty or unset $pppsettings{'TYPE'} variable which results
in a missplaced website footer.

This patch moves the code for closeing the table and the call of the
closebox() function to the correct place to prevent this display issue.

Fixes #10565.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 html/cgi-bin/pppsetup.cgi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Michael Tremer Oct. 19, 2015, 4:52 a.m. UTC | #1
Merged. Please take care of the bug report.

-Michael

On Sun, 2015-10-18 at 14:25 +0200, Stefan Schantl wrote:
> There was an issue with false generated HTML code, in case
> of an empty or unset $pppsettings{'TYPE'} variable which results
> in a missplaced website footer.
> 
> This patch moves the code for closeing the table and the call of the
> closebox() function to the correct place to prevent this display
> issue.
> 
> Fixes #10565.
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
>  html/cgi-bin/pppsetup.cgi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi
> index b3e8e6c..36d0ced 100644
> --- a/html/cgi-bin/pppsetup.cgi
> +++ b/html/cgi-bin/pppsetup.cgi
> @@ -980,12 +980,14 @@ print <<END
>          <td colspan='2' width='50%'>$Lang::tr{'legend'}:</td>
>          <td colspan='2' width='50%'><img src='/blob.gif' alt='*'
> />&nbsp;$Lang::tr{'required field'}</td>
>  </tr>
> -</table>
>  END
>  ;
> -&Header::closebox();
>  }
>  
> +print "</table>";
> +
> +&Header::closebox();
> +
>  print "</form>\n";
>  
>  &Header::closebigbox();