1111import fr .adrienbrault .idea .symfony2plugin .stubs .indexes .ContainerParameterStubIndex ;
1212import fr .adrienbrault .idea .symfony2plugin .stubs .indexes .ServicesDefinitionStubIndex ;
1313import fr .adrienbrault .idea .symfony2plugin .util .service .ServiceXmlParserFactory ;
14+ import org .apache .commons .lang .StringUtils ;
1415import org .jetbrains .annotations .NotNull ;
1516import org .jetbrains .annotations .Nullable ;
1617import org .jetbrains .yaml .YAMLFileType ;
@@ -318,7 +319,13 @@ private Map<String, ContainerParameter> getParameters() {
318319
319320 if (this .sources .contains (Source .COMPILER )) {
320321 for (Map .Entry <String , String > Entry : ServiceXmlParserFactory .getInstance (project , ParameterServiceParser .class ).getParameterMap ().entrySet ()) {
321- this .containerParameterMap .put (Entry .getKey (), new ContainerParameter (Entry .getKey (), Entry .getValue ()));
322+
323+ // user input here; secure nullable values
324+ String key = Entry .getKey ();
325+ if (key != null ) {
326+ this .containerParameterMap .put (key , new ContainerParameter (key , Entry .getValue ()));
327+ }
328+
322329 }
323330 }
324331
@@ -328,6 +335,11 @@ private Map<String, ContainerParameter> getParameters() {
328335
329336 for (String parameterName : projectUniqueKeysStrong .getResult ()) {
330337
338+ // just for secure
339+ if (parameterName == null ) {
340+ continue ;
341+ }
342+
331343 // indexes is weak stuff, dont overwrite compiled ones
332344 if (!this .containerParameterMap .containsKey (parameterName )) {
333345 List <String > parameterValues = FileBasedIndexImpl .getInstance ().getValues (ContainerParameterStubIndex .KEY , parameterName , getSearchScope (project ));
0 commit comments