-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[java] use the correct base64 decoder #11107
Conversation
The slightly wrong decoder was used to decode base64, using this decoder will copy the byte array at the end of decoding. Using the correct one, based on the W3C WebDriver specification, will not copy the byte array after decoding it.
Codecov ReportBase: 52.31% // Head: 52.31% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## trunk #11107 +/- ##
=======================================
Coverage 52.31% 52.31%
=======================================
Files 82 82
Lines 5503 5503
Branches 198 198
=======================================
Hits 2879 2879
Misses 2426 2426
Partials 198 198 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @joerg1985 !
hi , why do this change? i am using appium java client, which is depend on this project. but currently, when i call screenshot method, will throw Illegal base64 character xxx, i found the root cause is this change. |
@weikilla the W3C WebDriver specification does specify the Base64 decoder to use, see: https://www.w3.org/TR/webdriver/#index I think you should open a ticket at appium to get this fixed in the corresponding driver. Just my two cents, the selenium team might have a different opinion on this 😄 |
This change will break the backward compatibility between following java client versions and existing Appium drivers. We'd have to hack this implementation in Appium java client to workaround it. Even if we update the thing for multiple drivers, existing versions of them stay unchanged and there would be a mess. |
@mykola-mokhnach can you please create an issue to make sure we track this? I don't understand the difference in implementations, so I'd vote for reverting it in the next release and figuring out a better path forward if we need to make the change. |
@titusfortner created #11168 |
Description
Use the correct base64 decoder (RFC4648) as defined by the WebDriver specification.
Motivation and Context
Selenium should follow the WebDriver specification
Types of changes
Checklist