Project

General

Profile

Actions

Bug #3441

closed

Non-alphanumeric characters cause issues with Captive Portal

Added by Doktor Notor about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Captive Portal
Target version:
Start date:
02/08/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

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.

Actions #1

Updated by Doktor Notor about 10 years ago

Actions #2

Updated by Ermal Luçi about 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Ermal Luçi about 10 years ago

Actions #4

Updated by Chris Buechler about 10 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by Doktor Notor about 10 years ago

This did not work, sorry. Still getting the same problem with Mar 7 snapshot.

Actions #6

Updated by Doktor Notor about 10 years ago

Looks like you fixed the voucher rolls comment issue, but not the Invalid Voucher Message/Expired Voucher Message ones.

Actions #7

Updated by Doktor Notor about 10 years ago

Please, reopen this, the issue reported here is not fixed.

Actions #8

Updated by Renato Botelho about 10 years ago

  • Status changed from Resolved to New
Actions #9

Updated by Ermal Luçi about 10 years ago

Can you give information from your system?
/tmp/PHP_errors.log etc....

Actions #10

Updated by Ermal Luçi about 10 years ago

  • Status changed from New to Feedback
Actions #11

Updated by Ermal Luçi about 10 years ago

Actions #12

Updated by Doktor Notor about 10 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.

Actions #13

Updated by Doktor Notor about 10 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
Actions #14

Updated by Doktor Notor about 10 years ago

Also looks like the Invalid Voucher Message/Expired Voucher Message stopped syncing with the master...

Actions #15

Updated by Renato Botelho about 10 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.

Actions #16

Updated by Doktor Notor about 10 years ago

Well, this line is the closing tag:

</voucher>

Obviously not logging the relevant line where the issue really happens.

Actions #17

Updated by Doktor Notor about 10 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>
Actions #18

Updated by Warren Baker about 10 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.

Actions #19

Updated by Doktor Notor about 10 years ago

@Warren: Ah... Well, looks pretty clear now. Obvious crap there.

4742                         </roll>
4743                         <descrmsgnoaccess><![CDATA[Neplatn&yacute; 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 "š"

Actions #20

Updated by Doktor Notor about 10 years ago

Christ, this Redmine thing sucks...

The <9A> is supposed to be &scaron; AFAICT - i.e. letter "š" 
Actions #21

Updated by Renato Botelho about 10 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.

Actions #22

Updated by Doktor Notor about 10 years ago

ISO-8859-1? In 2014? Oh well... forget this bug report.

Actions #23

Updated by Doktor Notor about 10 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!

Actions #24

Updated by Renato Botelho about 10 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF