BUG: Expert MMDVMHost menu Pi-Star:4.1.2 / Dashboard:20200528

General support for the Pi-Star System
Post Reply
ke4iyp
Posts: 8
Joined: Sat Jun 13, 2020 8:14 pm

BUG: Expert MMDVMHost menu Pi-Star:4.1.2 / Dashboard:20200528

Post by ke4iyp »

If I save from the Expert/MMDVMHost menu it removes the quotes from around my password under [DMR Network] which then completely breaks editing the configuration. It's likely due to the fact that my Brandmeister Hotspot Security password contains a * and/or a ^. It manifests after saving under the expert by not rendering the expert menu and if you go to the configuration menu, you will not be able to save changes and instead get a "ERROR Unable to read source configuration file(s)... Please wait a few seconds and retry..." If I manually edit the quotes back into /etc/mmdvmhost, it returns functionality.

Of note, saving from the expert menu also removes the quotes around my town and country but probably doesn't break things because my town and country don't contain non-alphanumeric characters.

EDIT: It's the carat character. If the carat is at the end of the password, it really breaks things where it can't display the page on expert and be unable to save from Configuration. If there's a carat in the password in other locations, it will display the password as a 0 in the expert page.
ke4iyp
Posts: 8
Joined: Sat Jun 13, 2020 8:14 pm

Re: BUG: Expert MMDVMHost menu Pi-Star:4.1.2 / Dashboard:20200528

Post by ke4iyp »

There's a section of edit_mmdvmhost.php that never evaluates as far as I can see.

If line 64 is changed from:

Code: Select all

if ($section == "DMR Network" && $key == "Options" && $value) {
to

Code: Select all

if ($section == "DMR Network" && $key == "Password" && $value) {
then you can use passwords with special characters in it and it connects to Brandmeister fine.

The next stanza also looks for $key == "Options" and I'm not sure that will ever evaluate either, but doesn't seem to have a consequence either.

Essentially the code was falling through to the catch-all else and had the effect of stripping the quotes from the password and then parse_ini doesn't like those unescaped special chars and blows up pistar
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: BUG: Expert MMDVMHost menu Pi-Star:4.1.2 / Dashboard:20200528

Post by MW0MWZ »

ke4iyp wrote: Tue Jun 23, 2020 5:25 pm There's a section of edit_mmdvmhost.php that never evaluates as far as I can see.

If line 64 is changed from:

Code: Select all

if ($section == "DMR Network" && $key == "Options" && $value) {
to

Code: Select all

if ($section == "DMR Network" && $key == "Password" && $value) {
then you can use passwords with special characters in it and it connects to Brandmeister fine.

The next stanza also looks for $key == "Options" and I'm not sure that will ever evaluate either, but doesn't seem to have a consequence either.

Essentially the code was falling through to the catch-all else and had the effect of stripping the quotes from the password and then parse_ini doesn't like those unescaped special chars and blows up pistar
So the short answer to does it evaluate is yes, it does - maybe not always but it does, the more correct answer would be to have an OR or another check for Password rather than to abandon "Options" in favour of password.

I'll go take care of it..
Andy

73 de MW0MWZ
http://pistar.uk
Post Reply