-
Notifications
You must be signed in to change notification settings - Fork 5
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
[NAE-1944] Server-side JavaScript Code Injection (SSJI) #240
Conversation
- change Map<String, Object> to POJO object - write test
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Map<String, Object> requestQuery = new HashMap<>(); | ||
requestQuery.put("author.email", author.getEmail()); | ||
PetriNetSearch requestQuery = new PetriNetSearch(); | ||
Author authorQuery = new Author(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authorQuery
is not used, should it be set to requestQuery
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
long processCount = petriNetRepository.count() | ||
|
||
petriNetService.importPetriNet(stream(NET_SEARCH_FILE), VersionType.MAJOR, superCreator.getLoggedSuper()) | ||
petriNetService.importPetriNet(stream(NET_FILE), VersionType.MAJOR, superCreator.getLoggedSuper()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to use different author for one net to see if search by author works properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -160,4 +168,51 @@ class PetriNetServiceTest { | |||
List<PetriNet> petriNets = petriNetService.findAllByUriNodeId(myNode.id) | |||
assert petriNets.size() == 2 | |||
} | |||
|
|||
@Test | |||
void processSearch() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All searches use only one query param at a time, it would be better to also test request with multiple params (eg. author + version + identifier)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Description
Fixes NAE-1944
Dependencies
none
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
1 test in PetriNetServiceTest
Test Configuration
Checklist: