Skip to content

Commit c266797

Browse files
authored
Merge pull request #131 from bgrozev/revert-username-hack
Reverts feecace (username attribute …
2 parents 3940381 + 4c5cc16 commit c266797

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/main/java/org/ice4j/attribute/UsernameAttribute.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
package org.ice4j.attribute;
1919

20-
import org.ice4j.*;
21-
2220
import java.util.*;
2321

2422
/**
@@ -35,24 +33,6 @@ public class UsernameAttribute extends Attribute
3533
*/
3634
public static final String NAME = "USERNAME";
3735

38-
/**
39-
* The name of the property which controls whether trailing zeroes should
40-
* be stripped when decoding USERNAME attributes.
41-
*/
42-
public static final String STRIP_TRAILING_ZEROES_PNAME
43-
= "org.ice4j.attribute.UsernameAttribute.STRIP_TRAILING_ZEROES";
44-
45-
/**
46-
* Whether trailing zeroes should be stripped when decoding USERNAME
47-
* attributes. This is necessary to work around a bug in Edge described
48-
* here:
49-
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12332457/
50-
* and here:
51-
* https://github.com/jitsi/lib-jitsi-meet/issues/498
52-
*/
53-
private boolean stripTrailingZeroes
54-
= StackProperties.getBoolean(STRIP_TRAILING_ZEROES_PNAME, false);
55-
5636
/**
5737
* Username value.
5838
*/
@@ -79,14 +59,6 @@ public class UsernameAttribute extends Attribute
7959
@Override
8060
void decodeAttributeBody(byte[] attributeValue, char offset, char length)
8161
{
82-
if (stripTrailingZeroes)
83-
{
84-
while (length > 0 && attributeValue[offset + length - 1] == 0)
85-
{
86-
length--;
87-
}
88-
}
89-
9062
username = new byte[length];
9163
System.arraycopy(attributeValue, offset, username, 0, length);
9264
}

0 commit comments

Comments
 (0)