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

"after commit" user trigger search expression wrong #73

Open
drn05r opened this issue Jul 27, 2023 · 4 comments
Open

"after commit" user trigger search expression wrong #73

drn05r opened this issue Jul 27, 2023 · 4 comments
Assignees
Labels

Comments

@drn05r
Copy link
Contributor

drn05r commented Jul 27, 2023

The trigger to find eprint records that need updated when a user connects/disconnects is wrong as it will match parts of the creators ID (e.g. email address) and not the whole ID. This is a big problem if email addresses are used as creators ID as many may be for the same domain, so any eprint with a creators ID wthe an email address on the same domain will match. In fact they may even match on the parts of the domain (e.g. 'edu').

$search_exp->add_field(
fields => [ $ds->field( $role.'_id' ) ],
value => $email,
);

The search expression should use EX so it only matches exactly:

$search_exp->add_field(
    fields => [ $ds->field( 'creators_id' ) ],
    value => $email,
    match => 'EX',
);
@photomedia
Copy link

photomedia commented Apr 2, 2024

Wow, this bug is still not fixed? It seems like a major issue, no? Also, would the "EX" option make it a case-sensitive search? Because I don't think we want that, I think we want case insensitive.

@wfyson
Copy link
Collaborator

wfyson commented Apr 5, 2024

This tends not to be an issue (I've certainly never had it reported to me from anyone, and I can't reproduce it either) as the default matching option when one isn't specified is EQ, which EPrints describes as "Treat the value as a single string. Match only fields which have this value." So I think we're all good!

And I've just checked to see if it's case sensitive and it isn't so hopefully that meets your needs too!

@photomedia
Copy link

Thank you @wfyson . I thought also that if this was a real bug, then it would be serious enough that we would have seen reports of it. @drn05r , can you please review this info, as you submitted the bug, and close it if you confirm that this is not an issue?

@photomedia
Copy link

photomedia commented May 2, 2024

I just found one example of a user/depositor overwriting the author info of not their own item, right after connecting their ORCID. This could very well be an example of this issue. User A connects their ORCID at time T1, at the same time, User A modifies the deposit of User B by changing their creator name to null. The result is that another deposits creator name is removed from the deposit! User A and User B both have @gmail.com addresses in their profiles.

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

No branches or pull requests

3 participants