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

DietPi-Config - Unable to clear proxy username/password #7211

Closed
1 task done
dipisoft opened this issue Sep 4, 2024 · 4 comments
Closed
1 task done

DietPi-Config - Unable to clear proxy username/password #7211

dipisoft opened this issue Sep 4, 2024 · 4 comments
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@dipisoft
Copy link

dipisoft commented Sep 4, 2024

Creating a bug report/issue

  • I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9 | G_DIETPI_VERSION_SUB=7 | G_DIETPI_VERSION_RC=1 | G_GITBRANCH='master' | G_GITOWNER='MichaIng'
  • Distro version | bookworm
  • Kernel version | Linux DietPi 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
  • SBC model | Native PC (x86_64)
  • Power supply used | 12V
  • SD card used | SSD M2 16Go

Additional Information (if applicable)

  • Software title | dietpi-config
  • Can this issue be replicated on a fresh installation of DietPi? Yes

Steps to reproduce

  1. launch dietpi-config
  2. select option "7 : Network Options: Adapters"
  3. select option "Proxy"
  4. select option "Username", enter anything, "toto" for example and validate with "Ok"
  5. re-select option "Username", clear the entered value and validate with "Ok"
  6. the "[FAILED] An input value was not entered, please try again..." error message appears, despite the presence of the mention "Leave blank if not required"
  7. same behavior for the "Password" option

Expected behaviour

  • as the "Leave blank if not required" mentions, it should be possible to empty the previously entered values ​​in "Username" and "Password"

Actual behaviour

  • it is currently not possible to clear previously entered values ​​in "Username" and "Password"
@MichaIng MichaIng added this to the v9.8 milestone Sep 4, 2024
@MichaIng
Copy link
Owner

MichaIng commented Sep 4, 2024

Thanks for reporting. At some point we added a condition to our inputbox function to require some input, which we previously handled around the function call in various cases. We missed to adjust the call in this case.

For now, you can either adjust CONFIG_PROXY_USERNAME and CONFIG_PROXY_PASSWORD and re-apply settings by opening that menu and just select "Ok", or you edit the actual login script which applies the proxy settings: /etc/bashrc.d/dietpi-proxy.sh

I'll implement proper handling for variable inputbox conditions now.

MichaIng added a commit that referenced this issue Sep 4, 2024
- DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: #7211
@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Sep 4, 2024
@MichaIng
Copy link
Owner

MichaIng commented Sep 4, 2024

This should solve it: f7096ee
If you want to test, you can switch to dev branch this way:

G_DEV_BRANCH dev

And to revert

G_DEV_BRANCH master

@dipisoft
Copy link
Author

dipisoft commented Sep 4, 2024

Wow, what a responsiveness! 😮

Thank you very much! I'll try to test this tomorrow and get back to you.

@dipisoft
Copy link
Author

dipisoft commented Sep 5, 2024

Tested and it works, except in one particular case: if the content of the field started with space(s) then emptying the field is not taken into account. You have to operate in two steps: remove the space(s), validate, re-edit the field to remove the rest of the characters, validate. Only then will the field be truly emptied.

This was referenced Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants