Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1040

Elytron, incorrect IPv6 address resolution

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.1.0.Beta35
    • None
    • None
    • None

    Description

      There is code in Elytron

      SetMechanismInformationMechanismFactory.java
      @Override
                  public void evaluateRequest(HttpServerRequest request) throws HttpAuthenticationException {
                      String host = request.getFirstRequestHeaderValue(HOST);
                      String resolvedHostName = null;
                      if (host != null) {
                        if (host.startsWith("[")) {
                            int close = host.indexOf(']');
                            if (close > 0) {
                                resolvedHostName = host.substring(0, close);
                            }
                        }
      

      I assume intention of this code is to get from e.g. "[::1]:8080" just "[::1]", but now it gets only "[::1". To achieve this my assumption, there should be rather

      resolvedHostName = host.substring(0, close + 1);
      

      Attachments

        Issue Links

          Activity

            People

              darran.lofthouse@redhat.com Darran Lofthouse
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: