updatexlrator.cgi: Fix max disk usage input size

Message ID 20210812095148.855-1-hofmann@leo-andres.de
State Accepted
Commit 21a6d0129603f8dd2d1508c8e2d7a7c19d391bb3
Headers
Series updatexlrator.cgi: Fix max disk usage input size |

Commit Message

Leo-Andres Hofmann Aug. 12, 2021, 9:51 a.m. UTC
  Increase to 3 digits to fit a percentage number.

Fixes: #12675

Reported-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
---
 html/cgi-bin/updatexlrator.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Aug. 12, 2021, 10:31 a.m. UTC | #1
Odd, that this was set to one.

Thank you for looking into this problem.

-Michael

Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 12 Aug 2021, at 10:51, Leo-Andres Hofmann <hofmann@leo-andres.de> wrote:
> 
> Increase to 3 digits to fit a percentage number.
> 
> Fixes: #12675
> 
> Reported-by: Adolf Belka <adolf.belka@ipfire.org>
> Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
> ---
> html/cgi-bin/updatexlrator.cgi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
> index 9cfe08f4e..4d5cc1370 100644
> --- a/html/cgi-bin/updatexlrator.cgi
> +++ b/html/cgi-bin/updatexlrator.cgi
> @@ -398,7 +398,7 @@ print <<END
> 	<td class='base'>$Lang::tr{'updxlrtr passive mode'}:</td>
> 	<td class='base'><input type='checkbox' name='PASSIVE_MODE' $checked{'PASSIVE_MODE'}{'on'} /></td>
> 	<td class='base'>$Lang::tr{'updxlrtr max disk usage'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
> -	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='1' /> %</td>
> +	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='3' /> %</td>
> </tr>
> </table>
> <hr size='1'>
> -- 
> 2.27.0.windows.1
>
  
Bernhard Bitsch Aug. 12, 2021, 7:01 p.m. UTC | #2
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>

Am 12.08.2021 um 11:51 schrieb Leo-Andres Hofmann:
> Increase to 3 digits to fit a percentage number.
> 
> Fixes: #12675
> 
> Reported-by: Adolf Belka <adolf.belka@ipfire.org>
> Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
> ---
>   html/cgi-bin/updatexlrator.cgi | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
> index 9cfe08f4e..4d5cc1370 100644
> --- a/html/cgi-bin/updatexlrator.cgi
> +++ b/html/cgi-bin/updatexlrator.cgi
> @@ -398,7 +398,7 @@ print <<END
>   	<td class='base'>$Lang::tr{'updxlrtr passive mode'}:</td>
>   	<td class='base'><input type='checkbox' name='PASSIVE_MODE' $checked{'PASSIVE_MODE'}{'on'} /></td>
>   	<td class='base'>$Lang::tr{'updxlrtr max disk usage'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
> -	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='1' /> %</td>
> +	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='3' /> %</td>
>   </tr>
>   </table>
>   <hr size='1'>
>
  

Patch

diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
index 9cfe08f4e..4d5cc1370 100644
--- a/html/cgi-bin/updatexlrator.cgi
+++ b/html/cgi-bin/updatexlrator.cgi
@@ -398,7 +398,7 @@  print <<END
 	<td class='base'>$Lang::tr{'updxlrtr passive mode'}:</td>
 	<td class='base'><input type='checkbox' name='PASSIVE_MODE' $checked{'PASSIVE_MODE'}{'on'} /></td>
 	<td class='base'>$Lang::tr{'updxlrtr max disk usage'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
-	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='1' /> %</td>
+	<td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='3' /> %</td>
 </tr>
 </table>
 <hr size='1'>