spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Spring Cloud Gateway SSL Configurer Bundle Bug

Open pinxiong opened this issue 11 months ago • 0 comments

Describe the bug

When I upgrate spring-cloud-gateway to version 4.2.0, I found that SslBundles does work at all. After deeply diving into the source code, I found that the conditions might have some problems as below:

protected SslBundle getBundle() {
    // this conditional expression is always true
    if (ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
        return null;
    }
    if (bundles.getBundleNames().contains(ssl.getSslBundle())) {
	return bundles.getBundle(ssl.getSslBundle());
    }
    return null;
}

The problem is that the conditional expression is always true below.

if (ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
    return null;
}

Sample

  • Version: 4.2.0
  • Method: AbstractSslConfigurer#getBundle()

Question

I notified that this bug has been reported before, this bug might be fixed in version 4.2.1 .

I was wondering when we can expect an available version to be released?

References

  • #3641
  • #3673

pinxiong avatar Jan 26 '25 10:01 pinxiong