When setting a blank password, use webserver.api.password
instead of webserver.api.pwhash
#5465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR aim to accomplish?:
Per title, uses the correct config item to set an empty password (rather than forcible clearing out the hash)
This also prevents the password from being set to empty when someone has already set it to a value with
FTLCONF_webserver_api_password
Without environment variable set:
With environment variable set:
![image](https://private-user-images.githubusercontent.com/1998970/278832990-c01e1a15-b802-495a-87e1-768194d4d398.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwODY4NTAsIm5iZiI6MTcyMDA4NjU1MCwicGF0aCI6Ii8xOTk4OTcwLzI3ODgzMjk5MC1jMDFlMWExNS1iODAyLTQ5NWEtODdlMS03NjgxOTRkNGQzOTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDRUMDk0OTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjkwODk0OWRmYzExY2NiOWVkNjBlYjE5ZGJlOWZmMTU2MGE0OWExMTY1NmVhOTIxZTU4ODJhNTIxNWQ3OWZkZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KPjbsfajaC8ruio2lFS_a-e_k8ZI9WfTTH6FpZbYrDE)
By submitting this pull request, I confirm the following:
git rebase
)