Skip to content

Commit 333395e

Browse files
authored
Merge branch 'master' into patch-1
2 parents 2f8e7a1 + 820882b commit 333395e

File tree

418 files changed

+8193
-6095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

418 files changed

+8193
-6095
lines changed

build/checkstyle.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,16 @@
269269
<module name="FallThrough"/>
270270
<module name="EqualsHashCode"/>
271271
<module name="ArrayTrailingCommaCheck"/>
272-
<module name="FinalLocalVariable"/>
272+
<module name="FinalLocalVariable">
273+
<property name="validateEnhancedForLoopVariable" value="true"/>
274+
</module>
273275
<module name="MissingSwitchDefault"/>
274276
<module name="ModifiedControlVariable"/>
275277
<module name="MultipleVariableDeclarations"/>
276278
<module name="OneStatementPerLine"/>
277-
<module name="FinalParameters"/>
279+
<module name="FinalParameters">
280+
<property name="tokens" value="METHOD_DEF,CTOR_DEF,LITERAL_CATCH"/>
281+
</module>
278282
<module name="ParameterAssignment"/>
279283
<module name="SimplifyBooleanReturn"/>
280284
<module name="StringLiteralEquality"/>

client/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@microfocus/ng-ias": "1.0.1",
2222
"@microfocus/ux-ias": "1.1.2",
2323
"@uirouter/angularjs": "1.0.15",
24-
"angular": "1.7.8",
24+
"angular": "^1.7.9",
2525
"angular-aria": "1.7.8",
26-
"angular-sanitize": "1.7.8",
26+
"angular-sanitize": "1.7.9",
2727
"angular-translate": "2.18.1",
2828
"core-js": "3.2.1",
2929
"textangular": "1.5.16"
@@ -38,18 +38,18 @@
3838
"angular-mocks": "1.6.9",
3939
"autoprefixer": "8.1.0",
4040
"copy-webpack-plugin": "4.5.1",
41-
"css-loader": "^3.2.0",
41+
"css-loader": "^3.2.1",
4242
"file-loader": "1.1.11",
4343
"html-loader": "0.5.5",
4444
"html-webpack-plugin": "3.0.6",
4545
"ignore-loader": "0.1.2",
4646
"imports-loader": "0.8.0",
4747
"jasmine": "3.2.0",
4848
"jasmine-core": "3.2.1",
49-
"jshint": "^2.10.2",
49+
"jshint": "^2.10.3",
5050
"jshint-loader": "0.8.4",
5151
"json-loader": "0.5.7",
52-
"karma": "^4.3.0",
52+
"karma": "^4.4.1",
5353
"karma-chrome-launcher": "2.2.0",
5454
"karma-jasmine": "1.1.2",
5555
"karma-jasmine-html-reporter": "1.3.1",
@@ -59,7 +59,7 @@
5959
"karma-webpack": "3.0.5",
6060
"moment": "2.21.0",
6161
"ngtemplate-loader": "2.0.1",
62-
"node-sass": "^4.12.0",
62+
"node-sass": "^4.13.0",
6363
"phantomjs": "2.1.7",
6464
"phantomjs-prebuilt": "2.1.16",
6565
"postcss-loader": "2.1.1",
@@ -76,7 +76,7 @@
7676
"uglifyjs-webpack-plugin": "1.2.3",
7777
"url-loader": "1.0.1",
7878
"webpack": "4.1.1",
79-
"webpack-cli": "^3.3.8",
79+
"webpack-cli": "^3.3.10",
8080
"webpack-dev-server": "3.1.14",
8181
"webpack-merge": "4.1.2",
8282
"write-file-webpack-plugin": "4.2.0"

data-service/src/main/java/password/pwm/receiver/FtpDataIngestor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void readData( final Storage storage )
7474
{
7575
readFile( ftpClient, fileName, storage );
7676
}
77-
catch ( Exception e )
77+
catch ( final Exception e )
7878
{
7979
app.getStatus().setLastFtpIngest( Instant.now() );
8080
final String msg = "error while reading ftp file '" + fileName + "': " + e.getMessage();
@@ -93,7 +93,7 @@ void readData( final Storage storage )
9393
app.getStatus().setLastFtpIngest( Instant.now() );
9494
app.getStatus().setLastFtpFilesRead( files.size() );
9595
}
96-
catch ( Exception e )
96+
catch ( final Exception e )
9797
{
9898
app.getStatus().setLastFtpIngest( Instant.now() );
9999
app.getStatus().setLastFtpStatus( "error during ftp scan: " + e.getMessage() );
@@ -130,7 +130,7 @@ private void readZippedByteStream( final InputStream inputStream, final String f
130130
storage.store( bean );
131131
}
132132
}
133-
catch ( Exception e )
133+
catch ( final Exception e )
134134
{
135135
final String msg = "error reading ftp file '" + fileName + "', error: " + e.getMessage();
136136
LOGGER.info( msg );

data-service/src/main/java/password/pwm/receiver/PwmReceiverApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public PwmReceiverApp( )
5353
{
5454
settings = Settings.readFromFile( propsFile );
5555
}
56-
catch ( IOException e )
56+
catch ( final IOException e )
5757
{
5858
final String errorMsg = "can't read configuration: " + JavaHelper.readHostileExceptionMessage( e );
5959
status.setErrorState( errorMsg );
@@ -65,7 +65,7 @@ public PwmReceiverApp( )
6565
{
6666
storage = new Storage( settings );
6767
}
68-
catch ( Exception e )
68+
catch ( final Exception e )
6969
{
7070
final String errorMsg = "can't start storage system: " + JavaHelper.readHostileExceptionMessage( e );
7171
status.setErrorState( errorMsg );

data-service/src/main/java/password/pwm/receiver/Storage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private void doNext( )
173173
}
174174
nextValue = string;
175175
}
176-
catch ( Exception e )
176+
catch ( final Exception e )
177177
{
178178
e.printStackTrace();
179179
throw e;

data-service/src/main/java/password/pwm/receiver/TelemetryRestReceiver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ protected void doPost( final HttpServletRequest req, final HttpServletResponse r
5858
stoage.store( telemetryPublishBean );
5959
resp.getWriter().print( RestResultBean.forSuccessMessage( null, null, null, Message.Success_Unknown ).toJson() );
6060
}
61-
catch ( PwmUnrecoverableException e )
61+
catch ( final PwmUnrecoverableException e )
6262
{
6363
resp.getWriter().print( RestResultBean.fromError( e.getErrorInformation() ).toJson() );
6464
}
65-
catch ( Exception e )
65+
catch ( final Exception e )
6666
{
6767
final RestResultBean restResultBean = RestResultBean.fromError( new ErrorInformation( PwmError.ERROR_INTERNAL, e.getMessage() ) );
6868
resp.getWriter().print( restResultBean.toJson() );

onejar/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<properties>
1919
<project.root.basedir>${project.basedir}/..</project.root.basedir>
20-
<tomcat.version>9.0.27</tomcat.version>
20+
<tomcat.version>9.0.29</tomcat.version>
2121
</properties>
2222

2323
<build>

onejar/src/main/java/password/pwm/onejar/ArgumentParser.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public OnejarConfig parseArguments( final String[] args )
5858
{
5959
commandLine = new DefaultParser().parse( Argument.asOptions(), args );
6060
}
61-
catch ( ParseException e )
61+
catch ( final ParseException e )
6262
{
6363
throw new ArgumentParserException( "unable to parse command line: " + e.getMessage() );
6464
}
@@ -100,7 +100,7 @@ else if ( commandLine.hasOption( Argument.help.name() ) )
100100
{
101101
onejarConfig = makeTomcatConfig( argumentMap );
102102
}
103-
catch ( IOException e )
103+
catch ( final IOException e )
104104
{
105105
throw new ArgumentParserException( "error while reading input: " + e.getMessage() );
106106
}
@@ -118,7 +118,7 @@ private Map<Argument, String> mapFromProperties( final String filename ) throws
118118
{
119119
props.load( is );
120120
}
121-
catch ( IOException e )
121+
catch ( final IOException e )
122122
{
123123
throw new ArgumentParserException( "unable to read properties input file: " + e.getMessage() );
124124
}
@@ -204,7 +204,7 @@ private OnejarConfig makeTomcatConfig( final Map<Argument, String> argumentMap )
204204
port = Integer.parseInt( argumentMap.get( Argument.port ) );
205205
onejarConfig.port( port );
206206
}
207-
catch ( NumberFormatException e )
207+
catch ( final NumberFormatException e )
208208
{
209209
final String msg = Argument.port.name() + " argument must be numeric";
210210
System.out.println( msg );
@@ -228,7 +228,7 @@ private OnejarConfig makeTomcatConfig( final Map<Argument, String> argumentMap )
228228
final ServerSocket socket = new ServerSocket( port, 100, InetAddress.getByName( localAddress ) );
229229
socket.close();
230230
}
231-
catch ( Exception e )
231+
catch ( final Exception e )
232232
{
233233
throw new ArgumentParserException( "port or address conflict: " + e.getMessage() );
234234
}

onejar/src/main/java/password/pwm/onejar/OnejarMain.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static void main( final String[] args )
5252
{
5353
onejarConfig = argumentParser.parseArguments( args );
5454
}
55-
catch ( ArgumentParserException | OnejarException e )
55+
catch ( final ArgumentParserException | OnejarException e )
5656
{
5757
output( "error parsing command line: " + e.getMessage() );
5858
}
@@ -91,7 +91,7 @@ private void execCommand( final OnejarConfig onejarConfig )
9191

9292
mainMethod.invoke( null, ( Object ) arguments );
9393
}
94-
catch ( Exception e )
94+
catch ( final Exception e )
9595
{
9696
e.printStackTrace( );
9797
}
@@ -111,7 +111,7 @@ void deployWebApp( final OnejarConfig onejarConfig )
111111
runner.startTomcat( onejarConfig );
112112

113113
}
114-
catch ( OnejarException | ServletException | IOException e )
114+
catch ( final OnejarException | ServletException | IOException e )
115115
{
116116
out( "error starting tomcat: " + e.getMessage() );
117117
}

onejar/src/main/java/password/pwm/onejar/TomcatOnejarRunner.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void startTomcat( final OnejarConfig onejarConfig )
7070
tlsProperties = this.executeOnejarHelper( onejarConfig );
7171
out( "keystore generated" );
7272
}
73-
catch ( Exception e )
73+
catch ( final Exception e )
7474
{
7575
throw new OnejarException( "error generating keystore: " + e.getMessage() );
7676
}
@@ -113,7 +113,7 @@ void startTomcat( final OnejarConfig onejarConfig )
113113
tomcat.start();
114114
out( "tomcat started in " + Duration.between( Instant.now(), startTime ).toString() );
115115
}
116-
catch ( Exception e )
116+
catch ( final Exception e )
117117
{
118118
throw new OnejarException( "unable to start tomcat: " + e.getMessage() );
119119
}
@@ -199,7 +199,7 @@ static String getVersion( ) throws OnejarException
199199
return attr.getValue( "Implementation-Version-Display" )
200200
+ " [" + ServerInfo.getServerInfo() + "]";
201201
}
202-
catch ( IOException e )
202+
catch ( final IOException e )
203203
{
204204
throw new OnejarException( "error reading internal version info: " + e.getMessage() );
205205
}

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<dependency>
167167
<groupId>com.puppycrawl.tools</groupId>
168168
<artifactId>checkstyle</artifactId>
169-
<version>8.25</version>
169+
<version>8.27</version>
170170
</dependency>
171171
</dependencies>
172172
<executions>
@@ -308,13 +308,13 @@
308308
<dependency>
309309
<groupId>org.mockito</groupId>
310310
<artifactId>mockito-core</artifactId>
311-
<version>3.1.0</version>
311+
<version>3.2.0</version>
312312
<scope>test</scope>
313313
</dependency>
314314
<dependency>
315315
<groupId>org.assertj</groupId>
316316
<artifactId>assertj-core</artifactId>
317-
<version>3.13.2</version>
317+
<version>3.14.0</version>
318318
<scope>test</scope>
319319
</dependency>
320320
<dependency>
@@ -332,13 +332,13 @@
332332
<dependency>
333333
<groupId>org.openjdk.jmh</groupId>
334334
<artifactId>jmh-core</artifactId>
335-
<version>1.21</version>
335+
<version>1.22</version>
336336
<scope>test</scope>
337337
</dependency>
338338
<dependency>
339339
<groupId>org.openjdk.jmh</groupId>
340340
<artifactId>jmh-generator-annprocess</artifactId>
341-
<version>1.21</version>
341+
<version>1.22</version>
342342
<scope>test</scope>
343343
</dependency>
344344

pwm-cr/src/main/java/password/pwm/cr/ChaiXmlResponseSetSerializer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public Map<Type, StoredResponseSet> read( final Reader input )
142142
{
143143
timestamp = CrUtils.parseDateString( timeStr );
144144
}
145-
catch ( ParseException e )
145+
catch ( final ParseException e )
146146
{
147147
throw new IllegalArgumentException( "unexpected error attempting to parse timestamp: " + e.getMessage() );
148148
}
@@ -173,14 +173,14 @@ public Map<Type, StoredResponseSet> read( final Reader input )
173173
break;
174174

175175
default:
176-
throw new IllegalStateException( "unknown response type '" + type + "'" );
176+
throw new IllegalStateException( "unknown response type '" + type + '\'' );
177177

178178
}
179179
}
180180
}
181181
}
182182
}
183-
catch ( JDOMException | IOException | NullPointerException e )
183+
catch ( final JDOMException | IOException | NullPointerException e )
184184
{
185185
throw new IllegalArgumentException( "error parsing stored response record: " + e.getMessage() );
186186
}
@@ -228,7 +228,7 @@ private static String elementNameForType( final Type type )
228228
return XML_NODE_HELPDESK_RESPONSE;
229229

230230
default:
231-
throw new IllegalArgumentException( "unknown type '" + type + "'" );
231+
throw new IllegalArgumentException( "unknown type '" + type + '\'' );
232232
}
233233
}
234234

@@ -279,7 +279,7 @@ private static StoredResponseItem parseAnswerElement( final Element element )
279279
{
280280
saltCount = Integer.parseInt( hashCount );
281281
}
282-
catch ( NumberFormatException e )
282+
catch ( final NumberFormatException e )
283283
{
284284
/* noop */
285285
}
@@ -306,7 +306,7 @@ private static String makeId(
306306
final byte[] hashedBytes = md.digest( questionText.getBytes( StandardCharsets.UTF_8 ) );
307307
return net.iharder.Base64.encodeBytes( hashedBytes, Base64.URL_SAFE );
308308
}
309-
catch ( NoSuchAlgorithmException | IOException e )
309+
catch ( final NoSuchAlgorithmException | IOException e )
310310
{
311311
throw new IllegalStateException( "unable to load SHA1 message digest algorithm: " + e.getMessage() );
312312
}

pwm-cr/src/main/java/password/pwm/cr/CrUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.time.Instant;
2727
import java.util.TimeZone;
2828

29+
@SuppressWarnings( "checkstyle:MultipleStringLiterals" )
2930
public class CrUtils
3031
{
3132
static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss Z";

pwm-cr/src/main/java/password/pwm/cr/hash/HashFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private static ResponseHashMachine machineForStoredResponse( final StoredRespons
5454
{
5555
alg = ResponseHashAlgorithm.valueOf( algName );
5656
}
57-
catch ( IllegalArgumentException e )
57+
catch ( final IllegalArgumentException e )
5858
{
5959
throw new IllegalArgumentException( "unknown format type '" + algName + "'" );
6060
}
@@ -64,7 +64,7 @@ private static ResponseHashMachine machineForStoredResponse( final StoredRespons
6464
{
6565
responseHashMachine = ( ResponseHashMachineSpi ) algClass.newInstance();
6666
}
67-
catch ( Exception e )
67+
catch ( final Exception e )
6868
{
6969
throw new IllegalStateException( "unexpected error instantiating response hash machine spi class: " + e.getMessage() );
7070
}

pwm-cr/src/main/java/password/pwm/cr/hash/PBKDF2HashMachine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private String hashValue( final String input, final int iterations, final String
115115
final byte[] hash = skf.generateSecret( spec ).getEncoded();
116116
return Base64.encodeBytes( hash );
117117
}
118-
catch ( Exception e )
118+
catch ( final Exception e )
119119
{
120120
throw new IllegalStateException( "unable to perform PBKDF2 hashing operation: " + e.getMessage() );
121121
}

0 commit comments

Comments
 (0)