Skip to content

Commit

Permalink
Merge pull request #131 from bgrozev/revert-username-hack
Browse files Browse the repository at this point in the history
Reverts feecace (username attribute …
  • Loading branch information
bbaldino authored Aug 21, 2017
2 parents 3940381 + 4c5cc16 commit c266797
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/main/java/org/ice4j/attribute/UsernameAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package org.ice4j.attribute;

import org.ice4j.*;

import java.util.*;

/**
Expand All @@ -35,24 +33,6 @@ public class UsernameAttribute extends Attribute
*/
public static final String NAME = "USERNAME";

/**
* The name of the property which controls whether trailing zeroes should
* be stripped when decoding USERNAME attributes.
*/
public static final String STRIP_TRAILING_ZEROES_PNAME
= "org.ice4j.attribute.UsernameAttribute.STRIP_TRAILING_ZEROES";

/**
* Whether trailing zeroes should be stripped when decoding USERNAME
* attributes. This is necessary to work around a bug in Edge described
* here:
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12332457/
* and here:
* https://github.com/jitsi/lib-jitsi-meet/issues/498
*/
private boolean stripTrailingZeroes
= StackProperties.getBoolean(STRIP_TRAILING_ZEROES_PNAME, false);

/**
* Username value.
*/
Expand All @@ -79,14 +59,6 @@ public class UsernameAttribute extends Attribute
@Override
void decodeAttributeBody(byte[] attributeValue, char offset, char length)
{
if (stripTrailingZeroes)
{
while (length > 0 && attributeValue[offset + length - 1] == 0)
{
length--;
}
}

username = new byte[length];
System.arraycopy(attributeValue, offset, username, 0, length);
}
Expand Down

0 comments on commit c266797

Please sign in to comment.