Skip to content

Improve the error message when BR's --crypter.key is invalid #56388

@kennytm

Description

@kennytm

Enhancement

When you run

br backup full -s '/tmp/testbr' --crypter.method aes128-ctr --crypter.key 'LW0uhBTEsXUu3N89QTvG6A=='

it will report the error

Error: encoding/hex: invalid byte: U+004C 'L'

because the key input should be hexadecimal (2D6D2E8414C4B1752EDCDF3D413BC6E8) rather than base64. But the error message is very unclear.

It should explicitly say something like "crypter key for aes128-ctr should be a hexadecimal string with 32 digits".

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/brThis issue is related to BR of TiDB.found/gsfound by gsreport/customerCustomers have encountered this bug.type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions