Skip to content

Commit c4ab993

Browse files
andypaicuchromium-wpt-export-bot
authored andcommitted
[PEPC] Clamp border radius to 25%/50% (width/height) to prevent possible abuse
If the border and radius is set up in a clever way, it can cover a significant portion of the permission element's text without this being detected. This CL limits the possible values of border-radius to at most 50% for height and 25% for width. Also fix the `text-indent` property in CSS which should not be inherited to the permission element at all (but currently is). Change-Id: I891fd42b2435aeb2f46af377158bb27518a0b513 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6825964 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Andy Paicu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1498247}
1 parent fc4f94d commit c4ab993

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8" />
4+
<body>
5+
<style>
6+
permission {
7+
border-radius: 25%/50%;
8+
}
9+
</style>
10+
<permission type="camera"></permission>
11+
</body>
12+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8" />
4+
<link rel="match" href="border-radius-bounds-ref.html" />
5+
<link
6+
rel="help"
7+
href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style"
8+
/>
9+
<body>
10+
<style>
11+
permission {
12+
border-radius: 1000px;
13+
}
14+
</style>
15+
<permission type="camera"></permission>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)