frozenpandaman / s3s

Successor to splatnet2statink. Takes battle data from the SplatNet 3 app and uploads it to stat.ink!
https://github.com/frozenpandaman/s3s/wiki
GNU General Public License v3.0
403 stars 72 forks source link

Incorrect uuid generation #79

Closed spacemeowx2 closed 1 year ago

spacemeowx2 commented 1 year ago

According to the documentation, the uuid of SALMON RUN should use the whole base64 decode result.

When posting to stat.ink from data obtained from SplatNet, we expect the following method to generate a uuid. This method IS DIFFERENT with the Battle API.

decode Base64'ed ID from coopHistoryDetail.id ("CoopHistoryDetail-u-..." ) Calc UUIDv5 with namespace f1911910-605e-11ed-a622-7085c2057a9d

$theUUID = uuid_v5(
  base64_decode($history->id),
  uuid_from_string('f1911910-605e-11ed-a622-7085c2057a9d'),
);

From: https://github.com/fetus-hina/stat.ink/wiki/Spl3-API:-Salmon-%EF%BC%8D-Post#splatnet-data-based-uuid

But the entire id is not used in s3s:

https://github.com/frozenpandaman/s3s/blob/1bcdedac88fd987025e045973cd2850da90904e4/s3s.py#L758-L759

frozenpandaman commented 1 year ago

Thank you! Oops…

Fixed in 5e25859 + a79454d.