Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme: Favorites file (favorites.json) might have to get garbage data #623

Closed
mateusz-szafraniec opened this issue Dec 29, 2016 · 14 comments

Comments

@mateusz-szafraniec
Copy link

mateusz-szafraniec commented Dec 29, 2016

System/Webmin language: PL-UTF8

When something from Webmin menu is added to favorites, and it contains national character like "ś", "ó" etc, it causes Webmin crash, displaying blank page:
For example: Dislay system log ("Wyświetl log"):

HTTP/1.0 500 Perl execution failed
Server: MiniServ/1.820
Date: Thu, 29 Dec 2016 10:21:22 GMT
Content-type: text/html; Charset=iso-8859-1
Connection: close
<h1>Error - Perl execution failed</h1>
<pre>Wide character in syswrite at /usr/share/webmin/miniserv.pl line 3083.
</pre>

Content of favorites.json:
{"favorites":[ { "link": "/syslog/save_log.cgi?oidx=0&omod=fail2ban&view=1", "title": "System/Logi systemowe: Wyświetl log", "icon": "webmin" } ]}&_=1483006733460

@iliajie
Copy link
Collaborator

iliajie commented Dec 30, 2016

Hi,

Thanks for reporting.

I will reproduce it and try to fix it a bit later.

@iliajie
Copy link
Collaborator

iliajie commented Dec 30, 2016

Hi,

I can't reproduce it.

Are you sure that you have UTF-8 type of language set in both Webmin Configuration -> Language and Change Language and Theme?

@mateusz-szafraniec
Copy link
Author

mateusz-szafraniec commented Dec 30, 2016

Yes, i have UTF-8 in both options.
Please try to copy&paste provided example of favorites.json

@iliajie
Copy link
Collaborator

iliajie commented Dec 30, 2016

Could you update to the latest Webmin 1.830?

@mateusz-szafraniec
Copy link
Author

mateusz-szafraniec commented Dec 30, 2016

I have it already, problem still exists. On Ubuntu and Debian. Try something witch character ś
After that, please reload whole page - Ctrl-F5.

@iliajie
Copy link
Collaborator

iliajie commented Jan 1, 2017

I still can't reproduce it.

The reason why it fails is because you have &_=1483006733460 in the file. Remove it manually and try again.

@iliajie iliajie changed the title National characters in Favorites causes Webmin to crash. Theme: Favorites file (favorites.json) might have to get garbage data Jan 1, 2017
@iliajie iliajie closed this as completed Jan 2, 2017
@mateusz-szafraniec
Copy link
Author

Problem still exists, please have a look:
https://www.youtube.com/watch?v=yDRnbcV-Fw0&feature=youtu.be

@iliajie
Copy link
Collaborator

iliajie commented Jan 13, 2017

Hi,

Mateusz. I have watched closely your video. I will do my best to reproduce it and fix it upon next release.

I have downloaded your video. You can delete it from YouTube.

@iliajie iliajie reopened this Jan 13, 2017
@iliajie
Copy link
Collaborator

iliajie commented Feb 12, 2017

I could reproduce it.

Working on the fix.

@iliajie
Copy link
Collaborator

iliajie commented Feb 12, 2017

Have a try with the fix 945c625

@mateusz-szafraniec
Copy link
Author

Nope, problem still exists...
{"favorites":[ { "link": "/fail2ban/", "title": "Sieć/Fail2Ban - detektor intruzów: Fail2Ban - detektor intruzów", "icon": "webmin" }, { "link": "/lpadmin/", "title": "Sprzęt/Zarządzanie drukarkami: Zarządzanie drukarkami", "icon": "webmin" }, { "link": "/package-updates/", "title": "System/Aktualizacja pakiet�w oprogramowania: Aktualizacja pakiet�w oprogramowania", "icon": "webmin" } ]}

`

Error - Perl execution failed

Wide character in syswrite at /usr/share/webmin/miniserv.pl line 3087. `

@iliajie
Copy link
Collaborator

iliajie commented Mar 19, 2017

I can say that I copy/paste your JSON string. It works just fine. It loads without any problem.

What is your OS and the setup? Can you still reproduce this issue?

@iliajie
Copy link
Collaborator

iliajie commented Mar 19, 2017

Try mine, does it fail with your setup?

Here is how my favorites.json look like:

{"favorites":[
    {
        "link": "/fail2ban/",
        "title": "Nie-używane moduły/Fail2Ban - detektor intruzów: Fail2Ban - detektor intruzów",
        "icon": "webmin"
    },
    {
        "link": "/package-updates/",
        "title": "System/Aktualizacja pakietów oprogramowania: Aktualizacja pakietów oprogramowania",
        "icon": "webmin"
    },
    {
        "link": "/lpadmin/",
        "title": "Sprzęt/Zarządzanie drukarkami: Zarządzanie drukarkami",
        "icon": "webmin"
    }
]}

@iliajie
Copy link
Collaborator

iliajie commented Mar 19, 2017

No, really. It just works.

iliajie pushed a commit that referenced this issue May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants