Bug 13030 - Core Update 172: OpenVPN page - Table style rendering bug
Summary: Core Update 172: OpenVPN page - Table style rendering bug
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - Aesthetic Issue
Assignee: Adolf Belka
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-15 23:38 UTC by Doctor Who
Modified: 2023-02-28 20:11 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doctor Who 2023-01-15 23:38:22 UTC
Overview:

There is a minor table style rendering bug in the OpenVPN page.

Steps to Reproduce:

1. Go to Services -> OpenVPN,
2. right click on the "Network configuration:" and "Cryptographic options:" bold lines
5. and select "Inspect" in the contextual menu.

It will open the web console and display the HTML source code of the corresponding lines.

Actual Results:

The parent <td> element which construct the table cell seems to have a quoting issue and has been rendered incorrectly: "<td class'base'="">"

Expected Results:

The parent <td> element should be rewritten from:

<td class'base'="">

To:

<td class="base">

In order to not trigger the quirks mode* in browsers to render the table cells.

*: https://en.wikipedia.org/wiki/Quirks_mode

Additional Information:

The bug has been spotted in IPFire Core Update 172 using Chromium version 108.0.5359.71 (latest one for Ubuntu 20.04)
Comment 1 Michael Tremer 2023-01-16 19:10:41 UTC
@Adolf: Are you happy to pick this one up?
Comment 2 Doctor Who 2023-01-16 21:49:52 UTC
Just to add some context, it's almost not visible for the user, it's purely an aesthetic issue so not really urgent I think if I may say something about that.

I've tried to find out where this bug could be located in the "ovpnmain.cgi" file and I think I've found the right lines:

[root@[REDACTED] cgi-bin]# grep -B1 -n "<td class'base'><b>" --color=always ovpnmain.cgi 
2712-	<tr>
2713:		<td class'base'><b>$Lang::tr{'misc-options'}</b></td>
--
2767-    <tr>
2768:	<td class'base'><b>$Lang::tr{'log-options'}</b></td>
--
4650-	<tr>
4651:		<td class'base'><b>$Lang::tr{'MTU settings'}</b></td>
--
4674-	<tr>
4675:		<td class'base'><b>$Lang::tr{'ovpn crypt options'}:</b></td>
--
5224-	<tr>
5225:		<td class'base'><b>$Lang::tr{'net config'}:</b></td>
--
5241-	<tr>
5242:		<td class'base'><b>$Lang::tr{'ovpn crypt options'}:</b></td>

From what I can see, it's just a missing "=" between "class" and "base" so this:

<td class'base'><b>

Should just be replaced by:

<td class='base'><b>

And that's all :D

I did the fix locally and it solved the rendering issue. I then ran this command to make sure that no similar issues still exists:

[root@[REDACTED] cgi-bin]# grep -B1 -n "class'" --color=always ovpnmain.cgi

Got empty output so I've tried again with this command:

[root@[REDACTED] cgi-bin]# grep -B1 -n "class='" --color=always ovpnmain.cgi

And it confirms that there is no other similar issues in the file.

To finish, I've ran the same command over the whole "cgi-bin" folder and there is no other similar issues:

[root@[REDACTED] cgi-bin]# grep -B1 -n "class'" --color=always -R


Hope to have helped you a little bit to track this bug :)

++

Jiab77
Comment 3 Adolf Belka 2023-01-17 09:51:36 UTC
(In reply to Michael Tremer from comment #1)
> @Adolf: Are you happy to pick this one up?

No problems
Comment 5 Doctor Who 2023-01-17 18:32:36 UTC
(In reply to Adolf Belka from comment #4)
> Patch submitted to dev mailing list and patchwork.
> 
> https://lists.ipfire.org/pipermail/development/2023-January/015252.html
> https://patchwork.ipfire.org/project/ipfire/patch/20230117140358.3564163-1-
> adolf.belka@ipfire.org/

Awesome! Thanks a lot for your work on that!
Comment 7 Adolf Belka 2023-02-06 14:21:45 UTC
Core Update 173 Testing has been released

https://blog.ipfire.org/post/ipfire-2-27-core-update-173-is-available-for-testing
Comment 8 Adolf Belka 2023-02-06 16:54:56 UTC
The updated ovpnmain.cgi was not installed as part of the Core Update 173 Testing. 

The file in my vm IPFire system does not have the changes and running grep on /var/log/pakfire/update-core-upgrade-173.log looking for ovpnmain does not find anything.
Comment 9 Peter Müller 2023-02-07 11:42:31 UTC
Thank you for flagging this. It is odd, since the OpenVPN CGI file _should_ be included in the update:

$ ipfire-2.x/config/rootfiles/core/173/filelists> grep ovpnmain.cgi * 2> /dev/null
files:srv/web/ipfire/cgi-bin/ovpnmain.cgi

For some reason, however, it is not. I'll investigate and report back.
Comment 10 Peter Müller 2023-02-07 22:07:33 UTC
Having build Core Update 173 locally on my machine from scratch again, it indeed looks like the files in ~/ipfire-2.x/config/rootfiles/core/173/filelists/files are not shipped, which also includes a variety of other things that need to go into the update.

At the moment, I don't know why this is.

@Michael: Could you have a look at this while I'm away, and investigate why "files" is ignored while assembling the Core Update? That would be highly appreciated - otherwise, I'll take care of it after I return.
Comment 11 Adolf Belka 2023-02-10 20:09:31 UTC
Checked this again with (Build: master/deb11b3f) but the change did not get included.
Comment 12 Adolf Belka 2023-02-24 11:08:52 UTC
Checked with Development Build: master/a98b79f8 and the fix was implemented with the install. So can verify the fix.
Comment 14 Doctor Who 2023-02-28 20:11:27 UTC
That's awesome guys!

I've tested my own work before and after the update to core 173 and it worked perfectly so next time I'm working on my IPFire related project I'll remove the extra code that was added to deal with the now fixed issue :)