Skip to content

Commit

Permalink
fix checking the internal UMS Cling requests (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
valib committed Jun 10, 2020
1 parent c738b29 commit c71a2f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/net/pms/network/RequestHandlerV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,9 @@ private boolean isKnownHeader(String headerName) {
}

private boolean isLocalClingRequest(InetAddress ia, String userAgent) {
// FIXME: this would also block an external cling-based client running on the same host
return userAgent != null && userAgent.contains("Cling/") &&
return userAgent != null &&
userAgent.contains("UMS/") &&
userAgent.contains("Cling/") &&
ia.getHostAddress().equals(PMS.get().getServer().getHost());
}

Expand Down

0 comments on commit c71a2f8

Please sign in to comment.