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

Fix packager NPE if using the passwords=true option #9429

Merged
merged 1 commit into from May 1, 2024

Conversation

amgciadev
Copy link
Contributor

References

Add references/links to any related issues or PRs. These may include:

Description

Very simple fix to include a check for empty password hash string before generating the password mets element

Instructions for Reviewers

To verify fix:

  1. An eperson without a password must exist in the DB (this is a common scenario in cases where shibboleth login is used)
  2. Run package command to generate a site package with the passwords=true option, e.g. [dspace]/bin/dspace -d -t AIP -o passwords=true -e [admin email] -i [handle_prefix]/0 [full-path-to-aip-package]

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • If my PR fixes an issue ticket, I've linked them together.

Fix NPE if empty password hash string
@tdonohue tdonohue added bug tools: packager Related to package or AIP importer/exporter 1 APPROVAL pull request only requires a single approval to merge. port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Mar 21, 2024
@tdonohue tdonohue added this to the 8.0 milestone May 1, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @amgciadev ! This is a very obvious code fix. Merging immediately.

@tdonohue tdonohue merged commit e632c30 into DSpace:main May 1, 2024
19 of 20 checks passed
@dspace-bot
Copy link

Successfully created backport PR for dspace-7_x:

@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge. bug tools: packager Related to package or AIP importer/exporter
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Generate site AIP package using packager fails with an NPE if using the passwords=true option
3 participants