Bug #3441
closedNon-alphanumeric characters cause issues with Captive Portal
100%
Description
On trying to enter a message with diacritics (e.g. ěščřžýáíéúů) on a CP Zone - Vouchers - Invalid Voucher Message/Expired Voucher Message, as soon as I hit Save, I get "pfSense is restoring the configuration /cf/conf/backup..." message.
BTW, this input validation bug has been mentioned with voucher rolls on the forum 1 1/2 year ago, I have not tested whether it's fixed or not.
Updated by Doktor Notor almost 10 years ago
Forgot the forum thread; see https://forum.pfsense.org/index.php?topic=51489.0
Updated by Ermal Luçi almost 10 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset bd369bcfb4499cc91f7de090dbe67daefc635f64.
Updated by Ermal Luçi almost 10 years ago
Applied in changeset 378296af776e28c47652fd1268708be73f5f19ad.
Updated by Chris Buechler almost 10 years ago
- Status changed from Feedback to Resolved
Updated by Doktor Notor over 9 years ago
This did not work, sorry. Still getting the same problem with Mar 7 snapshot.
Updated by Doktor Notor over 9 years ago
Looks like you fixed the voucher rolls comment issue, but not the Invalid Voucher Message/Expired Voucher Message ones.
Updated by Doktor Notor over 9 years ago
Please, reopen this, the issue reported here is not fixed.
Updated by Ermal Luçi over 9 years ago
Can you give information from your system?
/tmp/PHP_errors.log etc....
Updated by Ermal Luçi over 9 years ago
- Status changed from New to Feedback
Applied in changeset 1274cfd47d7c8462becccd5e154457750bc38fbc.
Updated by Ermal Luçi over 9 years ago
Applied in changeset f3f04169f860542904f4cb833f0b9da9e5f424a8.
Updated by Doktor Notor over 9 years ago
Sorry, this is STILL broken with Sat Mar 15 02:43:41 EDT 2014 snapshot. Nothing relevant in /tmp/PHP_errors.log. nanobsd on Alix.
Updated by Doktor Notor over 9 years ago
The only relevant thing logged is this:
Mar 15 23:04:59 php: /services_captiveportal_vouchers.php: XML error: Invalid character at line 4619 in /conf/config.xml
Updated by Doktor Notor over 9 years ago
Also looks like the Invalid Voucher Message/Expired Voucher Message stopped syncing with the master...
Updated by Renato Botelho over 9 years ago
- Status changed from Feedback to New
Doktor Notor wrote:
The only relevant thing logged is this:
[...]
Could you share content of this line? and possibly a context of 5 lines above and below.
Updated by Doktor Notor over 9 years ago
Well, this line is the closing tag:
</voucher>
Obviously not logging the relevant line where the issue really happens.
Updated by Doktor Notor over 9 years ago
I tried again on another box. Still, the same issue.
Mar 17 15:20:06 php: /services_captiveportal_vouchers.php: pfSense is restoring the configuration /cf/conf/backup/config-1395064499.xml Mar 17 15:20:05 php: /services_captiveportal_vouchers.php: XML error: Invalid character at line 4744 in /conf/config.xml
I don't know what to post here, since obviously the offending lines are gone and restored to previous state, which is:
4742 </roll> 4743 <descrmsgnoaccess><![CDATA[Neplatny voucher / Voucher invalid]]></descrmsgnoaccess> 4744 <descrmsgexpired><![CDATA[Platnost voucheru vyprsela / Voucher expired]]></descrmsgexpired> 4745 </hotel_wlan_zone> 4746 </voucher>
Updated by Warren Baker over 9 years ago
Doktor Notor wrote:
I don't know what to post here, since obviously the offending lines are gone and restored to previous state, which is:
There should be a config.xml.bad file in /conf which contains the invalid characters.
Updated by Doktor Notor over 9 years ago
@Warren: Ah... Well, looks pretty clear now. Obvious crap there.
4742 </roll> 4743 <descrmsgnoaccess><![CDATA[Neplatný voucher / Voucher invalid]]></descrmsgnoaccess> 4744 <descrmsgexpired><![CDATA[Platnost voucheru vypr<9A>ela / Voucher expired]]></descrmsgexpired>
The <9A> is supposed to be š AFAICT - i.e. letter "š"
Updated by Doktor Notor over 9 years ago
Christ, this Redmine thing sucks...
The <9A> is supposed to be š AFAICT - i.e. letter "š"
Updated by Renato Botelho over 9 years ago
- Status changed from New to Feedback
It happens because the char is not part of ISO-8859-1, and all pages on pfSense use this encoding. If you insert the same char on a Firewall -> Rule description for example, the same error will happen. The issue with captive portal is fixed since it's not accepting non-alphanumeric chars. It's a different issue, a new bug should be filled in order to change it for all fields that accepts non-alphanumeric chars. It won't be fixed before 2.1.1 since it's probably a big change.
Updated by Doktor Notor over 9 years ago
ISO-8859-1? In 2014? Oh well... forget this bug report.
Updated by Doktor Notor over 9 years ago
Oh, one last thing, definitely "change it for all fields that accepts non-alphanumeric chars" is something that definitely should NOT ever be done, since the only real bug here is that this thing uses Latin-1 instead of Unicode... So no, a bug like that - that's not something I'd ever file.
P.S. Thanks for the debugging time!
Updated by Renato Botelho over 9 years ago
- Status changed from Feedback to Resolved