小编Sye*_*ena的帖子

spring-boot-starter-parent 2.7.3 中升级到 SnakeYaml 1.31

有一个 springboot 项目,其中想要排除 Snakeyaml 1.30 或将其升级到 1.31,以避免强化问题报告

Snakeyaml 1.30 版本存在安全漏洞

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.3</version>
</parent>
Run Code Online (Sandbox Code Playgroud)

下面是在项目的有效pom.xml上看到的

  <dependency>
          <groupId>org.yaml</groupId>
          <artifactId>snakeyaml</artifactId>
          <version>1.30</version>
          <scope>compile</scope>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

是否有可能按照补救措施所说的将版本升级到 Snakeyaml 1.31 进行升级?

参考: https: //security.snyk.io/vuln/SNYK-JAVA-ORGYAML-2806360

java snakeyaml fortify spring-boot snyk

22
推荐指数
3
解决办法
4万
查看次数

ssl 和 StandardPBEStringEncryptor 的 PowerMock 问题

试图运行 Junit 测试

  1. 下面是使用org.jasypt.encryption.pbe.StandardPBEStringEncryptor的密码解密
>      Caused by: org.jasypt.exceptions.EncryptionInitializationException:
> java.security.NoSuchAlgorithmException: PBEWithMD5AndDES
> SecretKeyFactory not available
>             at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:716)
>             at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:553)
>             at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:705)
>             at com.optum.pdm.nameaddressstandardizer.PropertyFileLoader.getDecryptedValue(PropertyFileLoader.java:104)
>             ... 29 more
>         Caused by: java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available
>             at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
>             at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:159)
>             at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:703)
>             ... 32 more
Run Code Online (Sandbox Code Playgroud)
  1. TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())
Caused by: java.security.NoSuchAlgorithmException: class configured for TrustManagerFactory: sun.security.ssl.TrustManagerFactoryImpl$PKIXFactory not a TrustManagerFactory
    at sun.security.jca.GetInstance.checkSuperClass(GetInstance.java:258)
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
    at javax.net.ssl.TrustManagerFactory.getInstance(TrustManagerFactory.java:138)
    at com.optum.pdm.util.SSLConnectionHelper.getSslSocketFactory(SSLConnectionHelper.java:41)
    at com.optum.pdm.util.SSLConnectionHelper.getSSLContext(SSLConnectionHelper.java:31)
    ... 33 …
Run Code Online (Sandbox Code Playgroud)

ssl junit powermock javax.crypto

5
推荐指数
1
解决办法
1239
查看次数

什么是adb命令列出Android设备上安装的所有浏览器?

我想列出Android设备中的所有浏览器包名称

喜欢(chrome,Mozilla和UC浏览器)

有没有任何通用的adb命令?

java android adb

4
推荐指数
1
解决办法
1074
查看次数

追加列熊猫:类型错误:assign() 需要 1 个位置参数,但给出了 2 个

我想将新列附加到“trainData”,当我尝试使用.assign附加新列“Age”时,两个数据框都有 712 行方法抛出我下面的错误

使用数据帧附加列的正确方法是什么?

df = pd.read_csv("data/train.csv")
#Dropping the columns  
df = df.drop(['Ticket','Cabin'], axis=1)
#Dropping the na columns
df = df.dropna() 
print("Age ====", df["Age"])
titanic_dummies = pd.get_dummies(df, columns=['Pclass', 'Sex', 'Embarked'])

trainData = titanic_dummies[ ["Pclass_1", "Pclass_2", "Pclass_3","Sex_female","Sex_male","Embarked_C","Embarked_Q","Embarked_S"]]
print("My train data",trainData)
trainData = trainData.assign(df["Age"])
Run Code Online (Sandbox Code Playgroud)

下面是例外

  File "<ipython-input-79-3f3ce0263545>", line 1, in <module>
    runfile('C:/RafiWork/TASK/Personal/Data Science/Algorithmica/Day2/Titanic_Example/Test Neural Network/decisiontree.py', wdir='C:/RafiWork/TASK/Personal/Data Science/Algorithmica/Day2/Titanic_Example/Test Neural Network')

  File "C:\RafiWork\Softwares\MiniConda\envs\python35\lib\site-packages\spyder\utils\site\sitecustomize.py", line 688, in runfile
    execfile(filename, namespace)

  File "C:\RafiWork\Softwares\MiniConda\envs\python35\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, …
Run Code Online (Sandbox Code Playgroud)

python pandas

3
推荐指数
1
解决办法
6769
查看次数

标签 统计

java ×2

adb ×1

android ×1

fortify ×1

javax.crypto ×1

junit ×1

pandas ×1

powermock ×1

python ×1

snakeyaml ×1

snyk ×1

spring-boot ×1

ssl ×1