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

Agent register wizard doesn't handle properly special characters in password #5493

Closed
Tracked by #4205
asteriscos opened this issue May 24, 2023 · 1 comment · Fixed by #5738
Closed
Tracked by #4205

Agent register wizard doesn't handle properly special characters in password #5493

asteriscos opened this issue May 24, 2023 · 1 comment · Fixed by #5738
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@asteriscos
Copy link
Member

asteriscos commented May 24, 2023

Wazuh Elastic Rev Security
4.2 7.x 4xxx Basic, ODFE, Xpack
Browser
Chrome, Firefox, Safari, etc

Description
The password input in the Agent register wizard doesn't validate or handle special characters like single or double quotes for every operating system.

Preconditions

  1. Set use_password to true in the manager configuration

Screenshots
Screenshot from 2023-05-24 19-13-28
Screenshot from 2023-05-24 19-13-15

Additional context
Add any other context about the problem here. Here you can paste log entries too or any other useful information that may help with the issue.

@Machi3mfl
Copy link
Member

Testing enrollment comments

curl -so wazuh-agent.pkg https://packages.wazuh.com/4.x/macos/wazuh-agent-4.7.0-1.intel64.pkg && echo -e "WAZUH_MANAGER='192.168.0.19'\nWAZUH_AGENT_GROUP='default'\nWAZUH_AGENT_NAME='test-name'\nWAZUH_REGISTRATION_PASSWORD='password\"with\"doubleq\\'usds\\\"es'\n" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /
  • check when running the enrollment command and if the authd.pass agent file is created with correct password

Possible Solution

echo -e "WAZUH_MANAGER='192.168.0.19'\nWAZUH_AGENT_GROUP='default'\nWAZUH_AGENT_NAME='test-name'\nWAZUH_REGISTRATION_PASSWORD=$'password\"with\"doubleq\\'usds\\\"es'\n" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /
  • Using Check to add $ character in parameters definitions. (on macOS, Linux)
  • Possible ' scaping '"'"'

And check the test E2E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
3 participants