Skip to content

Different lengths used for short device IDs in UI #9313

Closed

Description

@KeyWeeUsr

Does your log mention database corruption?

No

Include required information

Please be sure to include at least:

  • which version of Syncthing and what operating system you are using
    • 1.27.1, but it's even in main
  • what happened
    • IDs are of different length from API and in client in specific sections
  • what you expected to happen instead
    • same-length IDs

ShortIDStringLength = 7
says 7 and therefore from, let's say /rest/system/connections I get first 7 characters as if split on -
return deviceID.substr(0, 6);
and
return deviceID.substr(0, 6);
however
return id.substr(0, 7) === shortID;
has the matching one and
<td class="text-right">{{ deviceName(devices[deviceCfg.introducedBy]) || deviceCfg.introducedBy.substring(0, 5) }}</td>
has even less than both - 5

Shouldn't it be the same everywhere? Would you welcome a patch or is this something you are aware of and it's kept because of some backward compatibility reason?

Activity

  1. added
    bug
    needs-triage
    on Jan 1, 2024
  2. changed the title [-]Mismatch in device ID length between server<->client and within client[/-] [+]Different lengths used for short device IDs in UI[/+] on Jan 1, 2024
  3. added
    ui
    and removed
    needs-triage
    on Jan 1, 2024
  4. imsodin commented on Jan 1, 2024

    @imsodin
    Member

    That very much looks unintentional indeed. And at first glance it's all "presentation" strings, so no other logic should depend on it. As in yes, a patch would be welcome.

  5. added a commit that references this issue on Jan 2, 2024
    2abfefc
  6. added 2 commits that reference this issue on Jan 4, 2024
    db2c610
    cbead14
  7. added this to the v1.27.3 milestone on Jan 4, 2024
  8. removed
    bug
    on Jan 8, 2024
  9. added a commit that references this issue on Jan 14, 2024
    b2ba185
  10. added
    frozen-due-to-age
    on Apr 9, 2025
  11. locked and limited conversation to collaborators on Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frozen-due-to-ageui

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions