security

Java Bouncy Castle generated ES256 key doesn't work with JWT.io

依然范特西╮ 提交于 2020-05-17 03:03:01
问题 I am generating a keypair like below: public static void main(String args[]) throws Exception{ StringWriter pemStrWriter = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(pemStrWriter); Security.addProvider(new BouncyCastleProvider()); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", "BC"); ECGenParameterSpec spec = new ECGenParameterSpec("secp256r1"); g.initialize(spec); KeyPair keyPair = g.generateKeyPair(); pemWriter.writeObject(new JcaPKCS8Generator(keyPair

Java Bouncy Castle generated ES256 key doesn't work with JWT.io

依然范特西╮ 提交于 2020-05-17 03:01:09
问题 I am generating a keypair like below: public static void main(String args[]) throws Exception{ StringWriter pemStrWriter = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(pemStrWriter); Security.addProvider(new BouncyCastleProvider()); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", "BC"); ECGenParameterSpec spec = new ECGenParameterSpec("secp256r1"); g.initialize(spec); KeyPair keyPair = g.generateKeyPair(); pemWriter.writeObject(new JcaPKCS8Generator(keyPair

Client access to Superglobals

一个人想着一个人 提交于 2020-05-17 02:59:14
问题 PHP Superglobals behave in different ways and I'm never sure about which one to use. When can the client (I'm not talking about hackers or security attacks, but " normal users ") edit, create or access a Superglobal variable? Even php.net documentation does not talk about this fact. Basing on what I've learnt so far I can summarize them in this way: superglobal read create edit $_GET V V V $_POST X V X $_FILES X V X $_SESSION ? X X $_COOKIE V V V I'm not talking about your PHP script which

Unable to read BouncyCastle generated privatekey in Java

夙愿已清 提交于 2020-05-16 02:28:45
问题 I have a method that generates a keypair as below: public void create() throws Exception{ StringWriter pemStrWriter = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(pemStrWriter); Security.addProvider(new BouncyCastleProvider()); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", "BC"); ECGenParameterSpec spec = new ECGenParameterSpec("secp256r1"); g.initialize(spec); KeyPair keyPair = g.generateKeyPair(); pemWriter.writeObject(keyPair.getPrivate()); pemWriter.close();

How to fix security issue in python?

别等时光非礼了梦想. 提交于 2020-05-15 16:35:31
问题 I have used os.system('cls' if os.name == 'nt' else 'clear') to clear the ouput while running scripts but on codacy i am getting one securiy issue Starting a process with a shell, possible injection detected, security issue. How to resolve the issue? Script link: https://www.codacy.com/app/vaibhavsingh97/StalkPy/file/9458582870/issues/source?bid=5189215&fileBranchId=5189215#l43 回答1: It has security issues just when you run the function with arguments taken from users. For example: import os

How to fix security issue in python?

最后都变了- 提交于 2020-05-15 16:34:08
问题 I have used os.system('cls' if os.name == 'nt' else 'clear') to clear the ouput while running scripts but on codacy i am getting one securiy issue Starting a process with a shell, possible injection detected, security issue. How to resolve the issue? Script link: https://www.codacy.com/app/vaibhavsingh97/StalkPy/file/9458582870/issues/source?bid=5189215&fileBranchId=5189215#l43 回答1: It has security issues just when you run the function with arguments taken from users. For example: import os

OAuth2 without Client Secret – Possible Phishing?

眉间皱痕 提交于 2020-05-15 09:43:09
问题 I've been reading the OAuth2 specs over and over, but I can't figure out one thing. Isn't the Authorization Code flow without Client Secret (which is now recommended for single page apps) highly insecure because it can easily be used for phishing? Let me explain: The Client redirects the Resource Owner to the Authorization Server, passing the Redirect URL and Client ID. The Resource Owner approves the request and the Authorization Server redirects him to the given Redirect URL and passes the

Security settings dialog does not list my app

烂漫一生 提交于 2020-05-15 09:34:08
问题 My app requires to access the calendar. Up to Catalina that worked with the sandbox with no big issues. Now under Catalina the app does not show in the security settings: I have set the Hardened Runtime with calendar access (also tried Sandbox with no different effects): Since I believe this is related to that signing stuff, here's my setting: Strangely enough I have another app which had been developed in parallel also using the calendar. And that app is listed in the security setting. So

Unsafe JavaScript attempt to initiate navigation for frame with URL

吃可爱长大的小学妹 提交于 2020-05-14 15:57:11
问题 This is a bit complicated, please bear with me. Website A has a iframe that contains website B and website B has a iframe that contain website C. There is a button on website C, when clicked, I want to refresh url of website B. below is the javascript called to do the refresh of website B from website C, which is in an iframe function url_update(id){ var host = 'https://websiteb.com '; var myHost = host.split('/'); if (id != "" && myHost != ""){ try { if (id.substring(0,1) != '/'){ id = '/' +

Unsafe JavaScript attempt to initiate navigation for frame with URL

大城市里の小女人 提交于 2020-05-14 15:56:54
问题 This is a bit complicated, please bear with me. Website A has a iframe that contains website B and website B has a iframe that contain website C. There is a button on website C, when clicked, I want to refresh url of website B. below is the javascript called to do the refresh of website B from website C, which is in an iframe function url_update(id){ var host = 'https://websiteb.com '; var myHost = host.split('/'); if (id != "" && myHost != ""){ try { if (id.substring(0,1) != '/'){ id = '/' +