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

handle specific check for case agent-target address is url #119

Conversation

lucamrgs
Copy link
Collaborator

@lucamrgs lucamrgs commented Apr 5, 2024

Supersedes #104
Technically, one could specify a URL address for an agent/target, and then a path in the http-api command that "starts from" the agent-target URL address. This could still generate a valid command.

In this PR I thus simply added a warning that advises if the URL address has a path stemming from the domain name, and if that path is different from the path specified in the command.

@MaartendeKruijf
Copy link
Collaborator

MaartendeKruijf commented Apr 8, 2024

Expected behaviour should be: if target address type is url it should append the command path to the url eg. (https://godcapability.example.com/ + command /users = https://godcapability.example.com/users). Also give a warning but continue execution if path in the command is the same as in the url (https://godcapability.example.com/users + command /users = https://godcapability.example.com/users/users)

@MaartendeKruijf MaartendeKruijf force-pushed the feature/104-strict-check-url-address-property-for-http-api-agents-to-match-command-information branch from a01e20d to b2d05ac Compare April 8, 2024 19:35
@lucamrgs
Copy link
Collaborator Author

@MaartendeKruijf should we test that the warning is logged or is it fine like this

@MaartendeKruijf MaartendeKruijf force-pushed the feature/104-strict-check-url-address-property-for-http-api-agents-to-match-command-information branch from b2d05ac to 5a01686 Compare April 17, 2024 12:08
@MaartendeKruijf MaartendeKruijf force-pushed the feature/104-strict-check-url-address-property-for-http-api-agents-to-match-command-information branch from 5a01686 to a25062f Compare May 13, 2024 16:02
@MaartendeKruijf MaartendeKruijf merged commit c386480 into development May 14, 2024
9 checks passed
@MaartendeKruijf MaartendeKruijf deleted the feature/104-strict-check-url-address-property-for-http-api-agents-to-match-command-information branch May 14, 2024 10:10
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