-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update agent server parse #2203
Conversation
…am dest to ensure that contact endpoints without explicit protocols (e.g. http) get parsed correctly.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2203 +/- ##
==========================================
- Coverage 73.04% 69.01% -4.04%
==========================================
Files 112 83 -29
Lines 8070 6155 -1915
==========================================
- Hits 5895 4248 -1647
+ Misses 2175 1907 -268 ☔ View full report in Codecov by Sentry. |
This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
SonarCloud Quality Gate failed. 0 Bugs 100.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Prevent catastrophic backtracking using the workaround explained here: https://stackoverflow.com/a/13577411/
for 'localhost'. Note that it will be parsed as 'unknown' unless you have a protocol, port, or TLD.
Kudos, SonarCloud Quality Gate passed! |
1 similar comment
Kudos, SonarCloud Quality Gate passed! |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 100.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 100.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
1 similar comment
Kudos, SonarCloud Quality Gate passed! 0 Bugs 100.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Description
Addresses the server-parsing bug (#2200) where the C2 server would incorrectly parse server values for manx agents. The urlparse method would not work properly if the protocol (e.g. http) was not provided.
The C2 server will now perform regex checks when storing the server and upstream dest values for agents:
protocol://fqdn_or_ip:port
orprotocol://fqdn_or_ip
will be saved accordingly. Any trailing forward slashes are removed.fqdn_or_ip:port
will be saved as-is, without any default protocol assumed. Any trailing forward slashes are removed. Note that port is required if no protocol is given. This will primarily handle tcp/udp endpoint values used by manx agents.unknown
.Type of change
How Has This Been Tested?
Added tests to confirm that the new parsing function works as expected.
Checklist: