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

Fixed agents numbering issue #899

Merged
merged 1 commit into from
Aug 2, 2016
Merged

Fixed agents numbering issue #899

merged 1 commit into from
Aug 2, 2016

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