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

While transferring issue tickets, wrong people might get referenced #7

Open
gridhead opened this issue Sep 25, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@gridhead
Copy link
Member

For instance, while transferring this comment https://gitlab.com/gridhead/protop2g-test/-/issues/441#note_1576615101 which references Kevin Fenzi and Steve Milner in the source namespace, it references Kevin Goulding and Sheri Milner in the destination namespace as the said usernames belong to them over there.

This might be a minor annoyance for the repositories that are open but for other repositories that either have limited access or consist of critical information that must not be leaked, referencing other users with the same URL on GitLab might lead to information leakage of critical nature as the tagged people are notified about the same.

@gridhead gridhead added the bug Something isn't working label Sep 25, 2023
@gridhead
Copy link
Member Author

gridhead commented Sep 25, 2023

As a quick fix, I have replaced the occurrences of the character @ in the issue tickets and comments with the character &. This might break other uses of the character @ in the issue tickets and comments, if it is used for code snippets but for now, it will not be inadvertently notifying people who have the same username in the destination namespace as the relevant person in the source namespace.

Here's a sample run that I used @Zlopez's account for - because he uses the same username across GitHub, Pagure and GitLab so that should be useful in testing out the changes. I created a test issue ticket https://pagure.io/firmitas-notifier/issue/22 where I referenced his username twice, once in the issue body and once in the comment body to see if both the occurrences are modified before transfer.

Here are the results from the run.

[ BUSY ] Requesting for source namespace metadata...
[ PASS ] Source namespace metadata acquisition succeeded!
         Name: firmitas-notifier
         Identifier: 16511
         Maintainer: Akashdeep Dhar (ID t0xic0der)
         Location: https://pagure.io/firmitas-notifier
         Address: https://t0xic0der:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@pagure.io/firmitas-notifier.git
         Created on: Thu May 25 10:36:32 2023
         Last modified on: Thu May 25 10:36:32 2023
         Tags: []
[ BUSY ] Requesting for destination namespace metadata...
[ PASS ] Destination namespace metadata acquisition succeeded!
         Name: gridhead/protop2g-test
         Identifier: 42823949
         Maintainer: gridhead (ID Akashdeep Dhar)
         Location: https://gitlab.com/gridhead/protop2g-test
         Address: https://gridhead:glpat-XXXXXXXXXXXXXXXXXXXX@gitlab.com/gridhead/protop2g-test.git
         Created on: 2023-01-23T16:18:30.217Z
         Last modified on: 2023-09-25T06:44:07.806Z
         Tags: []
[ BUSY ] Attempting source namespace issue ticket count...
[ WARN ] Migrating only open issue tickets from the source namespace to the destination namespace
[ PASS ] Source namespace issue ticket count succeeded!
         Found 14 issue ticket(s) across 1 page(s) in 2.23 second(s)
[ WARN ] Reading issue tickets information (Page 1 of 1)...
[ PASS ] Issue ticket information reading succeeded!
         Found 14 issue ticket(s) on this page in 2.47 second(s)
[ BUSY ] Migrating issue ticket #22 "Lets see if we are still bothering people with the migration" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/465 in 0.84 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 2 entities in 0.00 second(s)
[ BUSY ] Transferring comment (Entity 1 of 2)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/465#note_1577069594 in 0.73 second(s)
[ BUSY ] Transferring comment (Entity 2 of 2)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/465#note_1577069624 in 1.15 second(s)
[ BUSY ] Migrating issue ticket #21 "This is a sample issue ticket" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/466 in 0.78 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 6 entities in 0.00 second(s)
[ BUSY ] Transferring comment (Entity 1 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069692 in 1.10 second(s)
[ BUSY ] Transferring comment (Entity 2 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069728 in 0.80 second(s)
[ BUSY ] Transferring comment (Entity 3 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069753 in 0.76 second(s)
[ BUSY ] Transferring comment (Entity 4 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069785 in 1.03 second(s)
[ BUSY ] Transferring comment (Entity 5 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069816 in 1.15 second(s)
[ BUSY ] Transferring comment (Entity 6 of 6)...
[ PASS ] Comment transfer succeeded!
         Transferred to https://gitlab.com/gridhead/protop2g-test/-/issues/466#note_1577069872 in 1.07 second(s)
[ BUSY ] Migrating issue ticket #20 "[FMTS] TLS certificate for ursabot service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/467 in 1.25 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #19 "[FMTS] TLS certificate for resultsdb-centos.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/468 in 0.89 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #18 "[FMTS] TLS certificate for logging.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/469 in 1.14 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #17 "[FMTS] TLS certificate for fedora-messaging-operator.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/470 in 0.96 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #16 "[FMTS] TLS certificate for distrobuildsync-eln service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/471 in 1.45 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #15 "[FMTS] TLS certificate for discourse2fedmsg.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/472 in 0.91 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #14 "[FMTS] TLS certificate for centos-stream-robosignatory.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/473 in 1.28 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #13 "[FMTS] TLS certificate for cbs.stg service is about to expire in 360 days" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/474 in 1.27 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #4 "Test issue" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/475 in 0.95 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #3 "Test issue" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/476 in 0.93 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #2 "Test issue" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/477 in 0.82 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ BUSY ] Migrating issue ticket #1 "Test issue" by "Akashdeep Dhar (ID t0xic0der)"...
[ PASS ] Issue ticket migration succeeded!
         Migrated to https://gitlab.com/gridhead/protop2g-test/-/issues/478 in 0.91 second(s)
[ BUSY ] Reading comment information...
[ PASS ] Comment information reading succeeded!
         Found 0 entities in 0.00 second(s)
[ PASS ] Namespace assets transferring queue processed!
         14 issue ticket(s) transferred

The source assets can be found here https://pagure.io/firmitas-notifier/issue/22 and the destination assets can be found here https://gitlab.com/gridhead/protop2g-test/-/issues/465 along with all the necessary comments associated with the issue ticket.

gridhead added a commit that referenced this issue Sep 25, 2023
gridhead added a commit that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant