security

Javascript - key / certificate from USB Token

南楼画角 提交于 2019-12-28 03:10:36
问题 I would like to ask if is still impossible, using JavaScript, to get key from USB token or from certificate stored in Browser . I was reading many articles which said WebCryptoApi doesn't enable to do that. Is any option to get key from token? Maybe something was changed? 回答1: It is not possible for now. The WebCryptoApi does not support using keys stored in external keystores like smartcards, Mozilla keystore or Windows KeyStore (used by Chrome and Explorer), and reading the comments of the

difference between http.context.user and thread.currentprincipal and when to use them?

北战南征 提交于 2019-12-28 03:05:10
问题 I have just recently run into an issue running an asp.net web app under visual studio 2008. I get the error 'type is not resolved for member...customUserPrincipal'. Tracking down various discussion groups it seems that there is an issue with Visual Studio's web server when you assign a custom principal against the Thread.CurrentPrincipal. In my code, I now use... HttpContext.Current.User = myCustomPrincipal //Thread.CurrentPrincipal = myCustomPrincipal I'm glad that I got the error out of the

Unique key generation

余生颓废 提交于 2019-12-28 02:05:07
问题 I looking for a way, specifically in PHP that I will be guaranteed to always get a unique key. I have done the following: strtolower(substr(crypt(time()), 0, 7)); But I have found that once in a while I end up with a duplicate key (rarely, but often enough). I have also thought of doing: strtolower(substr(crypt(uniqid(rand(), true)), 0, 7)); But according to the PHP website, uniqid() could, if uniqid() is called twice in the same microsecond, it could generate the same key. I'm thinking that

How to reset Jenkins security settings from the command line?

混江龙づ霸主 提交于 2019-12-28 01:44:09
问题 Is there a way to reset all (or just disable the security settings) from the command line without a user/password as I have managed to completely lock myself out of Jenkins ? 回答1: The simplest solution is to completely disable security - change true to false in /var/lib/jenkins/config.xml file. <useSecurity>true</useSecurity> Then just restart Jenkins, by sudo service jenkins restart And then go to admin panel and set everything once again. If you in case are running your Jenkins inside k8s

How to secure my app against piracy

╄→гoц情女王★ 提交于 2019-12-28 01:41:12
问题 I am developing an android app and I am planning to publish it (paid app). I have heard that it is very easy to pirate Android apps (much easier than iphone). I was wondering from your experience or what you know, how can increase the security of my app? I know that I can never get it 100% secured but I want to make it harder for people to pirate it or distribute it illegally Any ideas, experiences, comments you can share? 回答1: I released a free anti-malware app for Android, and making sure

How to prevent a browser from storing password

与世无争的帅哥 提交于 2019-12-28 00:16:12
问题 I need to stop browsers from storing the username & password values, because I'm working on a web application which contains more secure data. My client asked me to do this. I tried the autocomplete="off" attribute in the HTML form & password fields. But it is not working in the latest browsers like Chrome 55, Firefox 38+, IE 11...etc. What is the best solution for this? 回答1: Thank you for giving a reply to me. I followed the below link Disable browser 'Save Password' functionality I resolved

CSRF protection: do we have to generate a token for every form?

三世轮回 提交于 2019-12-27 20:07:57
问题 Do we have to generate a token, for every form in a website? I mean, every-time to generate different token for every requested form? If not, why? 回答1: In general, it suffices to have just one token per session, a so called per-session token : In general, developers need only generate this token once for the current session. After initial generation of this token, the value is stored in the session and is utilized for each subsequent request until the session expires. If you want to further

Keystore type: which one to use?

℡╲_俬逩灬. 提交于 2019-12-27 16:33:10
问题 By looking at the file java.security of my JRE , I see that the keystore type to use by default is set to JKS . Here, there is a list of the keystore types that can be used. Is there a recommended keystore type? What are the pros/cons of the different keystore types? 回答1: There are a few more types than what's listed in the standard name list you've linked to. You can find more in the cryptographic providers documentation. The most common are certainly JKS (the default) and PKCS12 (for PKCS

Why do salts make dictionary attacks 'impossible'?

送分小仙女□ 提交于 2019-12-27 16:28:52
问题 Update: Please note I am not asking what a salt is, what a rainbow table is, what a dictionary attack is, or what the purpose of a salt is. I am querying: If you know the users salt and hash, isn't it quite easy to calculate their password? I understand the process, and implement it myself in some of my projects. s = random salt storedPassword = sha1(password + s) In the database you store: username | hashed_password | salt Every implementation of salting I have seen adds the salt either at

Buffer overflow works in gdb but not without it

我是研究僧i 提交于 2019-12-27 16:28:15
问题 I am on CentOS 6.4 32 bit and am trying to cause a buffer overflow in a program. Within GDB it works. Here is the output: [root@localhost bufferoverflow]# gdb stack GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and