When creating an atKeys file, if the filename contains a period ('.'), the last part of the filename is replaced with the '.atKeys' extension due to the path.setExtension() method. Attaching the API docs for reference: https://pub.dev/documentation/path/latest/path/Context/setExtension.html
To resolve this issue, the path.setExtension() method was removed. Now, if the filename does not already end with '.atKeys', the extension is concatenated to the filename string.
- How to verify it
Added unit test to assert the changes.
Tested with no-ports and with the changes works as expected. Attaching the test logs:
sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/noports/packages/dart/sshnoports$ ./bin/at_activate enroll -s ABC123 -p sshnp -d orac_subkey-1 -n "orac.sshnp:rw,orac.sshrvd:rw" -a @sitaram -r vip.ve.atsign.zone --keys ~/.atsign/keys/orac.sshnp
Submitting enrollment request
Enrollment ID: a5651010-fc9e-4643-9bb5-01540c074a39
Waiting for approval; will check every 10 seconds
Checking ... not approved. Will retry in 10 seconds
Checking ... not approved. Will retry in 10 seconds
Checking ... not approved. Will retry in 10 seconds
Checking ... approved.
Creating atKeys file
[Success] Your .atKeys file saved at /home/sitaram/.atsign/keys/orac.sshnp.atKeys
- Description for the changelog
.atKeys filename was trimmed when filename has period('.') in it
- What I did
When creating an atKeys file, if the filename contains a period ('.'), the last part of the filename is replaced with the '.atKeys' extension due to the path.setExtension() method. Attaching the API docs for reference: https://pub.dev/documentation/path/latest/path/Context/setExtension.html
To resolve this issue, the path.setExtension() method was removed. Now, if the filename does not already end with '.atKeys', the extension is concatenated to the filename string.
- How to verify it
- Description for the changelog
.atKeys
filename was trimmed when filename has period('.') in it