security

Unable to initialize provider. Missing or incorrect schema. for MySql.Web connector

一曲冷凌霜 提交于 2019-12-30 18:07:06
问题 Hey guys and gals running into a little issue here.. I'm trying to use MySql Connector 6.2.2.0 for membership and role providers.. The issue I'm having is: Unable to initialize provider. Missing or incorrect schema. <authentication mode="Forms"/> <roleManager defaultProvider="MySqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" > <providers> <clear />

How do I secure a hardcoded login/password in PHP?

喜欢而已 提交于 2019-12-30 18:00:42
问题 I'm writing a simple PHP script to access the Foursquare API. The PHP will always access the same Foursquare account. For the time being, I have this login information hardcoded in my script. What is the best way to secure this information? If I follow the advice from this thread, I should just place the login information in a config file outside the website's root directory: How to secure database passwords in PHP? Is this the best advice? Or is there a better way to secure the login

The 'Access-Control-Allow-Origin' header has a value 'http://localhost:4200' that is not equal to the supplied origin

♀尐吖头ヾ 提交于 2019-12-30 17:24:29
问题 (continuation of error message in title) " Origin 'http://127.0.0.1:4200' is therefore not allowed access." I am unable to run the same Angular 5 site on two different domains when working with the same API. This error message is coming from Chrome. The error in Firefox is: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myapitest.local/v1/subscription/current/products. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘http

Can a Thread be executed as another user? (.NET 2.0/3.5)

↘锁芯ラ 提交于 2019-12-30 11:10:06
问题 I have a C# application the performs some runtime compilation of source files containing calculations into dynamic assemblies. Obviously this presents a serious security issue. From the following 'formula', the code below would be generated, and a dynamic assembly created: Formula: Int32 _index = value.LastIndexOf('.'); String _retVal = value.Substring(_index + 1); return _retVal; Code Generated: using System; namespace Dynamics { public class Evaluator { public Object Evaluate(String value)

iPhone keyboard security,

社会主义新天地 提交于 2019-12-30 11:06:31
问题 I would like to disable auto text capture by OS, if you type in UITextField/UITextView OS capture this text ( If not found in it's dictionary ) in your application, it will be stored as plain text in dynamic-text.dat file in /root/Library/Keyboard Now if you open and read this file, you can easily read what you typed in your application. My requirement is, how can i disable this feature so that within my application, OS does not capture typed in text into this file? You can check this out

Does sensitive ASP.NET Session data need to be encrypted?

限于喜欢 提交于 2019-12-30 11:00:15
问题 Do ASP.NET Session[string key] data need to be encrypted to be secure? If such data always stays on the server, doesn't that make it safe to store credit card information, passwords, etc. there, as long as the data were sent via SSL from the client? 回答1: Anything sensitive should go straight to the database, and not hang around in memory longer than needed. I don't understand why you'd need to store passwords or credit card data in session variables anyway, are you passing them between pages?

Java - how to detect smartcard hotplug

此生再无相见时 提交于 2019-12-30 10:49:05
问题 I load dynamically pkcs11 security Provider in java and it works as long as the smart card reader is inserted before running the application. Could anyone please tell me how to detect a smartcard hotplug when the application is running? Actually I need something like pcsc_scan in java. The environment is Ubuntu 9.10 with java 1.6.0_20. Thanks in advance 回答1: PKCS#11 doesn't define a standard way to actively notify the application about device insertion/removal. The best you can do is to run a

Writing XSS Filter for (X)HTML Based on White List

有些话、适合烂在心里 提交于 2019-12-30 10:38:26
问题 I need to implement a simple and efficient XSS Filter in C++ for CppCMS. I can't use existing high quality filters written in PHP because because it is high performance framework that uses C++. The basic idea is provide a filter that have a while list of HTML tags and a white list of options for these tags. For example. typical HTML input can consist of <b> , <i> , tags and <a> tag with href . But straightforward implementation is not good enough, because, even allowed simple links may

How to connect to another MongoDB database as superuser using NodeJS?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 09:49:25
问题 The solution to this problem works fine: Instead of doing: $ mongo my_db_name -u superuser -p 1234 I do $ mongo admin -u superuser -p 1234 # connecting as super user to admin db > use anotherDb in shell. Which is the solution in NodeJS? I tried to connect to mongodb://superuser:1234@localhost:27017/my_db_name but I get this error: { [MongoError: auth fails] name: 'MongoError', code: 18, ok: 0, errmsg: 'auth fails' } My code is: var Db = require('mongodb').Db, MongoClient = require('mongodb')

Integrate oauth2 with native (iOS/Android) mobile application

耗尽温柔 提交于 2019-12-30 09:47:33
问题 I need to integrate OAuth2 in a iOS and Android native application. I have been researching on OAuth2 and mobile applications and found this documentation - Google APIs - Using OAuth 2.0 for Installed Applications The above documentation basically details how to consume Goolge OAuth 2.0 endpoint in mobile applications. Here is what the document says - When registering the application, you specify that the application is a Installed application. This results in a different value for the