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

JSON dumps fails #2103

Closed
1 of 3 tasks
AleksCee opened this issue Apr 4, 2018 · 5 comments
Closed
1 of 3 tasks

JSON dumps fails #2103

AleksCee opened this issue Apr 4, 2018 · 5 comments

Comments

@AleksCee
Copy link

AleksCee commented Apr 4, 2018

Environment:

  • Fail2Ban version (including any possible distribution suffixes):
  • OS, including release name/version:
  • Fail2Ban installed via OS/distribution mechanisms
  • You have not applied any additional foreign patches to the codebase
  • Some customizations were done to the configuration (provide details below is so)

I have installed from the tar because I have to use the Ipv6 version and in Ubuntu 16 the packed is to old. The issue was not found in the logs before version 0.10.3 and I have also installed 0.10.1 and 2 befor.

The issue:

since the update to 0.10.3 when banning ssh faules the log say something like this:
fail2ban.log:2018-04-04 21:07:26,420 fail2ban.database       [26384]: ERROR   json dumps failed: set([u'admin']) is not JSON serializable
fail2ban.log:2018-04-04 21:10:26,704 fail2ban.database       [26384]: ERROR   json dumps failed: set([u'mythtv']) is not JSON serializable
fail2ban.log:2018-04-04 21:23:03,310 fail2ban.database       [27707]: ERROR   json dumps failed: set([u'suzanne']) is not JSON serializable

The sting between the ‘‘ seams to be the trying username.

Thanks for help, Alex

@sebres
Copy link
Contributor

sebres commented Apr 4, 2018

Nice catch.
I'll try to fix it soon.

@AleksCee
Copy link
Author

AleksCee commented Apr 4, 2018

Oh, cool thanks. It‘s realy a bug, I was afraid it might be mine.

sebres added a commit to sebres/fail2ban that referenced this issue Apr 4, 2018
…ently there are only users, so simply serialized as a list.
@sebres
Copy link
Contributor

sebres commented Apr 4, 2018

I could reproduce it, fixed and covered in test-cases now in 34b586b for all python versions.
I'm waiting for the test-cases, then have to release 0.10.3.1 if succeeded.

@sebres
Copy link
Contributor

sebres commented Apr 4, 2018

Done

@sebres sebres closed this as completed Apr 4, 2018
@AleksCee
Copy link
Author

AleksCee commented Apr 5, 2018

Works fine, thank you!

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