Bug 10595 - Oddities with Certificate Names
Summary: Oddities with Certificate Names
Status: ON_QA
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all All
: Will affect an average number of users Balancing
Assignee: Adolf Belka
QA Contact:
URL:
Keywords: GoodFirstBug
Depends on:
Blocks: IPSECBUGS
  Show dependency treegraph
 
Reported: 2014-08-19 16:54 UTC by Tom Rymes
Modified: 2025-03-19 13:28 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Rymes 2014-08-19 16:54:48 UTC
I have noticed a few **very** minor oddities with certificate names when setting up IPSec Certificates:

1.) When you use the WUI to create the Root/Host certs for a machine, the 'C' in certificate is capitalized in "Host Certificate", but not in "Root certificate". This is obviously not a big deal, but it ought to be uniform, all the same.

2.) When uploading a remote system's root certificate, you are not able to specify a name that has any spaces in it, even though the local certificate names *DO* have spaces in them. If you try to specify a name with a space in it, you get the error "Name must only contain characters."
Comment 1 Tom Rymes 2015-10-15 23:37:54 UTC
OK, not much of a start, but I did figure out the solution to #1. The English translation file located at /var/ipfire/langs/en.pl contains the offending strings, and I would suggest changing line 1967 from 

'root certificate' => 'Root certificate',

to

'root certificate' => 'Root Certificate',

Is there somewhere that I should place this, or is here enough? attach a modified file?

I will try to figure out the portion of vpnmain.cgi that controls the form validation for #2, but that's way beyond my skillset.
Comment 3 Adolf Belka 2024-12-11 11:41:41 UTC
This bug has been closed as fixed but there were two parts to it and only the first part was fixed.

Therefore I have re-opened it and will submit a patch to fix the second part.

I came across this one when looking at a similar open bug related to OpenVPN where this bug related to IPSec was referenced.
Comment 4 Adolf Belka 2024-12-11 11:54:39 UTC
Patch submitted into dev mailing list and patchwork.

https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/thread/ROQIIEWTI3BHTN6CF2CLSE243BQ3GXRS/

https://patchwork.ipfire.org/project/ipfire/list/?series=4653

Change tested out on my vm system and confirmed to allow CA Names with spaces to be uploaded.
Comment 5 Adolf Belka 2024-12-20 14:04:16 UTC
The patch set has been reverted

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=754451021b7d6fa6aa812b1ac2f017fb118bd383

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=17ad30b9e2aaca5b90df98ceee9ac68a9c68e238

as the placing of quotation marks around the $_[0] I have learnt is bad code as it results in a potential vulnerability situation.

I have been given some guidance on an alternative approach and I am working on that and will re-submit the patch set as a v2 version once I have got the new fix working.
Comment 6 Adolf Belka 2025-03-03 14:12:14 UTC
Updated patch set submitted to dev mailing list and patchwork.

https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/thread/JW5LP2W3UAHZVN75TW4W5VLXNBC4CO2G/

https://patchwork.ipfire.org/project/ipfire/list/?series=4774

This v2 patch set version uses the &General::system_output function suggested by @Michael.
Comment 7 Adolf Belka 2025-03-06 11:47:15 UTC
v3 version of the patch set has been submitted as the previous v2 version clashed with another bug patch update of the same file.

https://lists.ipfire.org/development/20250306113221.6990-1-adolf.belka@ipfire.org/T/#t

https://patchwork.ipfire.org/project/ipfire/list/?series=4775