File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed 
main/java/io/r2dbc/postgresql/client 
test/java/io/r2dbc/postgresql/client Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public static boolean isValidSniHostname(String input) {
108108                return  false ;
109109            }
110110        }
111-         return  true ;
111+         return  ! input . endsWith ( "." ) ;
112112    }
113113
114114    // 
Original file line number Diff line number Diff line change 1+ package  io .r2dbc .postgresql .client ;
2+ 
3+ import  org .junit .jupiter .api .Test ;
4+ 
5+ import  static  org .assertj .core .api .Assertions .assertThat ;
6+ 
7+ /** 
8+  * Unit tests for {@link SSLConfig}. 
9+  */ 
10+ final  class  SSLConfigTests  {
11+     @ Test 
12+     public  void  testValidSniHostname (){
13+         assertThat (SSLConfig .isValidSniHostname ("example.com" )).isEqualTo (true );
14+         assertThat (SSLConfig .isValidSniHostname ("example://.com" )).isEqualTo (false );
15+         assertThat (SSLConfig .isValidSniHostname ("example.com." )).isEqualTo (false );
16+     }
17+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments