Bug 261537 - Remove Quirk shouldDisableDataURLPaddingValidation for office.com
Summary: Remove Quirk shouldDisableDataURLPaddingValidation for office.com
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 261524
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-13 16:49 PDT by Karl Dubost
Modified: 2023-09-13 16:50 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Dubost 2023-09-13 16:49:35 PDT
A quirk has been created for solving Bug 261524
rdar://114573089
where Images do not show in Microsoft Word Online 


Step to Reproduce to check if the Quirk is not needed anymore.
0. Disable Site Specific Hacks on Safari
1. Go to https://www.office.com/launch/word?auth=1 (log in if not yet)
2. Open a Word Document
3. Insert Picture
4. Choose from This Device
5. Choose the picture 

Result:
We get an image in the document.

We SHOULD NOT get a placeholder where the  image was not added and there is a red X.


When this is failing.
The little icon HTML says “Image download failed.”:

```
<img class="we_version2_CancelRequest_32x32x32"
     unselectable="on"
     role="presentation"
     src="https://res-1.cdn.office.net:443/officeonline/we/s/h83987E0F63D43F20_resources/1033/we_version2.png"
     alt="Image download failed."
     title="Image download failed.">
```

The failure in the Console log is 

```
> [Error] Failed to load resource: Data URL decoding failed (data:image/jpeg;base64,/9j…===, line 0)
```

Trying with a very small image.

```
[Error] Failed to load resource: Data URL decoding failed (data:image/png;base64,iVB…===, line 0)
[Error] Failed to load resource: Data URL decoding failed (data:image/png;base64,iVB…===, line 0)
[Error] WebSocket connection to 'wss://japaneast-pc01.augloop.office.com/' failed: The operation couldn’t be completed. Operation timed out
	s8h (WordEditorDS.js:2688:104)
	f (WordEditorDS.js:3781:390)
…
```

The URL is:

```
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABXSURBVBhXDczBDUBAFADR+bsRCUERytKEslSgIhFEWBesDd8eJnmnkb6rVT4IPrC7A+cuDG+OSBlR8YYslmKmwbOMD+v8cGwf92mQtik0sRZRiQuPivIDbH4mQDUPORoAAAAASUVORK5CYII====
```


Reason:
This is failing because the padding at the end of the URL is wrong. `====`
Comment 1 Radar WebKit Bug Importer 2023-09-13 16:50:11 PDT
<rdar://problem/115457624>