Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kennytm opened this issue Sep 28, 2024 · 0 comments · Fixed by #56589
Closed

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

kennytm opened this issue Sep 28, 2024 · 0 comments · Fixed by #56589
Labels
component/br This issue is related to BR of TiDB. found/gs found by gs report/customer Customers have encountered this bug. type/enhancement The issue or PR belongs to an enhancement.

Comments

@kennytm
Copy link
Contributor

kennytm commented Sep 28, 2024

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".

@kennytm kennytm added type/enhancement The issue or PR belongs to an enhancement. component/br This issue is related to BR of TiDB. found/gs found by gs report/customer Customers have encountered this bug. labels Sep 28, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 65fcaec Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. found/gs found by gs report/customer Customers have encountered this bug. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant