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

CSW server / Use portal filter in GetRecordById requests #7890

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

josegar74
Copy link
Member

Fixes #7443

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added this to the 4.4.4 milestone Mar 21, 2024
@josegar74 josegar74 changed the title CSW server / Use portal filter in GetRecordById requests. CSW server / Use portal filter in GetRecordById requests Mar 21, 2024
@@ -595,7 +627,7 @@
+ "-postprocessing.xsl");

if (Files.exists(styleSheet)) {
Map<String, Object> params = new HashMap<String, Object>();
Map<String, Object> params = new HashMap<>();

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@fxprunayre fxprunayre merged commit a51a5a3 into geonetwork:main Apr 12, 2024
5 of 6 checks passed
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply f4e32e2751... CSW server / Use portal filter in GetRecordById requests. Fixes #7443
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java
CONFLICT (content): Merge conflict in csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-7890-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick f4e32e2751e49be09f3d65c2ee0277d779738383,83be152470191b23b9b0c528a976e953aaedce2d,493093cd64f95dd34c336535f411d614a4e9490f
# Push it to GitHub
git push --set-upstream origin backport-7890-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-7890-to-4.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

csw:GetRecordById request to a sub-portal does not respect the portal filter
3 participants