Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top

Вебинар: Подводные камни регулярных выражений: катастрофический возврат, ReDoS-атаки и выявление уязвимостей - 30.04

>
>
>
Примеры ошибок, обнаруженных с...

Примеры ошибок, обнаруженных с помощью диагностики V6036

V6036. The value from the uninitialized optional is used.


OpenAPI Generator

V6036 The value from the uninitialized 'op.pathParams.stream().filter(p -> p.paramName.equals(pathParam)).findFirst()' optional is used. ScalaCaskServerCodegen.java 1021


private static CodegenParameter pathParamForName(
  CodegenOperation op,
  String pathParam
) {
  final CodegenParameter
    param = op.pathParams.stream()
                         .filter(p -> p.paramName.equals(pathParam))
                         .findFirst()
                         .get();
  if (param == null) {
    throw new RuntimeException("Bug: path param " + pathParam + " not found");
  }
  return param;
}

XMage

V6036 The value from the uninitialized 'selectUser' optional is used. Session.java(227)


public String connectUserHandling(String userName, String password)
{
  ....
  if (!selectUser.isPresent()) {  // user already exists
      selectUser = UserManager.instance.getUserByName(userName);
      if (selectUser.isPresent()) {
          User user = selectUser.get();
            ....
      }
  }
  User user = selectUser.get();
  ....
}