My tests show the fix works as intended and does indeed drop the offending metadata while still uploading the object and other metadata
#TEST CASE
[root@almatest xattrtest]# echo hello > test1.txt
[root@almatest xattrtest]# echo hello > test2.txt
[root@almatest xattrtest]# echo hello > test3.txt
[root@almatest xattrtest]# setfattr -n user.myattr -v 0sAgSQCwAAAAABwdaSUAAA6CCTUAAA6CCTUAAApBuTUAABwdaSUAABiiOTUAABiSOTUAABFQaTUAABJwSTUAAB6wGTUAAC/////w== test1.txt
[root@almatest xattrtest]# setfattr -n user.myattr -v sometextvalue test2.txt
#ORIGINAL VERSION
[root@almatest zack.ramjan]# /varidata/research/software/rclone/rclone-v1.60.0-beta.6462.7e547822d-linux-amd64/rclone -vv copyto -M xattrtest aws:vai-gggg-backup/xattrtest
2022/10/12 13:57:20 DEBUG : rclone: Version "v1.60.0-beta.6462.7e547822d" starting with parameters ["/varidata/research/software/rclone/rclone-v1.60.0-beta.6462.7e547822d-linux-amd64/rclone" "-vv" "copyto" "-M" "xattrtest" "aws:vai-gggg-backup/xattrtest"]
2022/10/12 13:57:20 DEBUG : Creating backend with remote "xattrtest"
2022/10/12 13:57:20 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/10/12 13:57:20 DEBUG : fs cache: renaming cache item "xattrtest" to be canonical "/varidata/researchtemp/hpctmp/zack.ramjan/xattrtest"
2022/10/12 13:57:20 DEBUG : Creating backend with remote "aws:vai-gggg-backup/xattrtest"
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for checks to finish
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for transfers to finish
2022/10/12 13:57:20 ERROR : test1.txt: Failed to copy: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 DEBUG : test2.txt: md5 = b1946ac92492d2347c6235b4d2611184 OK
2022/10/12 13:57:20 INFO : test2.txt: Copied (new)
2022/10/12 13:57:20 DEBUG : test3.txt: md5 = b1946ac92492d2347c6235b4d2611184 OK
2022/10/12 13:57:20 INFO : test3.txt: Copied (new)
2022/10/12 13:57:20 ERROR : Attempt 1/3 failed with 1 errors and: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for checks to finish
2022/10/12 13:57:20 ERROR : test1.txt: Failed to copy: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 DEBUG : test3.txt: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/10/12 13:57:20 DEBUG : test3.txt: Unchanged skipping
2022/10/12 13:57:20 DEBUG : test2.txt: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/10/12 13:57:20 DEBUG : test2.txt: Unchanged skipping
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for transfers to finish
2022/10/12 13:57:20 ERROR : Attempt 2/3 failed with 1 errors and: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for checks to finish
2022/10/12 13:57:20 ERROR : test1.txt: Failed to copy: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 DEBUG : test2.txt: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/10/12 13:57:20 DEBUG : test2.txt: Unchanged skipping
2022/10/12 13:57:20 DEBUG : test3.txt: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/10/12 13:57:20 DEBUG : test3.txt: Unchanged skipping
2022/10/12 13:57:20 DEBUG : S3 bucket vai-gggg-backup path xattrtest: Waiting for transfers to finish
2022/10/12 13:57:20 ERROR : Attempt 3/3 failed with 1 errors and: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
2022/10/12 13:57:20 INFO :
Transferred: 12 B / 12 B, 100%, 0 B/s, ETA -
Errors: 1 (retrying may help)
Checks: 4 / 4, 100%
Transferred: 2 / 2, 100%
Elapsed time: 0.5s
2022/10/12 13:57:20 DEBUG : 7 go routines active
2022/10/12 13:57:20 Failed to copyto: Put "https://vai-gggg-backup.s3.us-east-2.amazonaws.com/xattrtest/test1.txt": net/http: invalid header field value for "X-Amz-Meta-Myattr"
#METADATA XATTR FIXED VERSION
[root@almatest zack.ramjan]# /varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone -vv copyto -M xattrtest aws:vai-gggg-backup/xattrtest2
2022/10/12 14:00:10 DEBUG : rclone: Version "v1.60.0-beta.6481.5d2c36222.fix-s3-metadata" starting with parameters ["/varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone" "-vv" "copyto" "-M" "xattrtest" "aws:vai-gggg-backup/xattrtest2"]
2022/10/12 14:00:10 DEBUG : Creating backend with remote "xattrtest"
2022/10/12 14:00:10 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/10/12 14:00:10 DEBUG : fs cache: renaming cache item "xattrtest" to be canonical "/varidata/researchtemp/hpctmp/zack.ramjan/xattrtest"
2022/10/12 14:00:10 DEBUG : Creating backend with remote "aws:vai-gggg-backup/xattrtest2"
2022/10/12 14:00:10 DEBUG : S3 bucket vai-gggg-backup path xattrtest2: Waiting for checks to finish
2022/10/12 14:00:10 DEBUG : S3 bucket vai-gggg-backup path xattrtest2: Waiting for transfers to finish
2022/10/12 14:00:10 ERROR : test1.txt: Dropping invalid metadata value "\x02\x04\x90\v\x00\x00\x00\x00\x01\xc1֒P\x00\x00\xe8 \x93P\x00\x00\xe8 \x93P\x00\x00\xa4\x1b\x93P\x00\x01\xc1֒P\x00\x01\x8a#\x93P\x00\x01\x89#\x93P\x00\x01\x15\x06\x93P\x00\x01'\x04\x93P\x00\x01\xeb\x01\x93P\x00\x02\xff\xff\xff\xff" for key "myattr"
2022/10/12 14:00:10 DEBUG : test1.txt: md5 = b1946ac92492d2347c6235b4d2611184 OK
2022/10/12 14:00:10 INFO : test1.txt: Copied (new)
2022/10/12 14:00:10 DEBUG : test3.txt: md5 = b1946ac92492d2347c6235b4d2611184 OK
2022/10/12 14:00:10 INFO : test3.txt: Copied (new)
2022/10/12 14:00:10 DEBUG : test2.txt: md5 = b1946ac92492d2347c6235b4d2611184 OK
2022/10/12 14:00:10 INFO : test2.txt: Copied (new)
2022/10/12 14:00:10 INFO :
Transferred: 18 B / 18 B, 100%, 0 B/s, ETA -
Transferred: 3 / 3, 100%
Elapsed time: 0.3s
2022/10/12 14:00:10 DEBUG : 9 go routines active
#VALIDATION
[root@almatest zack.ramjan]# /varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone -vv lsf --format M aws:vai-gggg-backup/xattrtest
2022/10/12 14:03:41 DEBUG : rclone: Version "v1.60.0-beta.6481.5d2c36222.fix-s3-metadata" starting with parameters ["/varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone" "-vv" "lsf" "--format" "M" "aws:vai-gggg-backup/xattrtest"]
2022/10/12 14:03:41 DEBUG : Creating backend with remote "aws:vai-gggg-backup/xattrtest"
2022/10/12 14:03:41 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
{"atime":"2022-10-12T13:36:33.563051-04:00","btime":"2022-10-12T17:57:21Z","content-type":"text/plain; charset=utf-8","gid":"0","mode":"100644","mtime":"2022-10-12T13:36:33.56321-04:00","myattr":"sometextvalue","uid":"0"}
{"atime":"2022-10-12T13:37:27.260352-04:00","btime":"2022-10-12T17:57:21Z","content-type":"text/plain; charset=utf-8","gid":"0","mode":"100644","mtime":"2022-10-12T13:37:27.260641-04:00","uid":"0"}
2022/10/12 14:03:42 DEBUG : 4 go routines active
[root@almatest zack.ramjan]# /varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone -vv lsf --format M aws:vai-gggg-backup/xattrtest2
2022/10/12 14:03:47 DEBUG : rclone: Version "v1.60.0-beta.6481.5d2c36222.fix-s3-metadata" starting with parameters ["/varidata/research/software/rclone/rclone-v1.60.0-beta.6481.5d2c36222.fix-s3-metadata-linux-amd64/rclone" "-vv" "lsf" "--format" "M" "aws:vai-gggg-backup/xattrtest2"]
2022/10/12 14:03:47 DEBUG : Creating backend with remote "aws:vai-gggg-backup/xattrtest2"
2022/10/12 14:03:47 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
{"atime":"2022-10-12T13:36:27.289772-04:00","btime":"2022-10-12T18:00:11Z","content-type":"text/plain; charset=utf-8","gid":"0","mode":"100644","mtime":"2022-10-12T13:36:27.289941-04:00","uid":"0"}
{"atime":"2022-10-12T13:36:33.563051-04:00","btime":"2022-10-12T18:00:11Z","content-type":"text/plain; charset=utf-8","gid":"0","mode":"100644","mtime":"2022-10-12T13:36:33.56321-04:00","myattr":"sometextvalue","uid":"0"}
{"atime":"2022-10-12T13:37:27.260352-04:00","btime":"2022-10-12T18:00:11Z","content-type":"text/plain; charset=utf-8","gid":"0","mode":"100644","mtime":"2022-10-12T13:37:27.260641-04:00","uid":"0"}
2022/10/12 14:03:47 DEBUG : 4 go routines active