Skip to content

Comments

Fixed agents numbering issue#899

Merged
ddpbsd merged 1 commit intoossec:masterfrom
wazuh:agent_numbering
Aug 2, 2016
Merged

Fixed agents numbering issue#899
ddpbsd merged 1 commit intoossec:masterfrom
wazuh:agent_numbering

Conversation

@vikman90
Copy link
Contributor

@vikman90 vikman90 commented Jul 16, 2016

OSSEC agent IDs can only be numbers but they are treated as strings. Because of this, it's possible to add the agent "00" and "000", or "1" and "00001" at the same time, and they can be confused on extracting keys or on deleting agents.

This fix always makes manage_agents to convert the user input into integers and re-format them into at least 3-digit strings (padded with zeroes). So user inputs referring agent ID "1" or "00001" will become "001".

@ddpbsd ddpbsd merged commit d64c772 into ossec:master Aug 2, 2016
@vikman90 vikman90 deleted the agent_numbering branch August 2, 2016 23:11
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

Successfully merging this pull request may close these issues.

2 participants