Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fresh install of privacyIDEA 3.1.1 via Python Package Index.
When adding a machine resolver via "Config" - "Machines" - "New HOSTS resolver", I can fill in a "File name" field, to specify the location of the "hosts" file to parse.
Although saving that value produces no error, immediately re-editing the resolver settings shows an empty field and listing all "Machines" (top-level) produces an empty list.
Looking at the logs, immediately the following catches the eye:
The reason seems to be that the UI uses the parameter "fileName", while the code in HostsMachineResolver looks for "filename". Changing the resolver code solved the issue for me:
I see that you are running python 3.6.
However, If you want to, you are welcome to provide a corresponding pull request.
Hm, maybe I am a bit confused now. I think we should do this in lower case, so that existing database values can be read.
I am again a bit confused, because the only place, where "fileName" exists is in the config controller:
But in the view, we use
Please take a look to fix this (so that "filename" is stored in the db)
So I have had a closer look and this seems to be an easy fix, we just have to pick one capitalization and stick with it. Are you sure
Changing the capitalization would also mean having to write a database migration. We could avoid that by sticking with the current version, however we might want to write a migration either way, since triggering this bug will leave an orphaned
From my understanding this has worked in the past, which means we also need to make sure that the changes we make to fix this do not break preexisting resolvers. I am assuming right now these use