security

file_get_contents() and Curl

 ̄綄美尐妖づ 提交于 2020-01-05 09:43:43
问题 I am using file_get_contents() php function in my laravel 4.2 code to get profile photo after login through facebook . it worked correctly when I use this $arrContextOptions=array( "ssl"=>array( "verify_peer"=> false, "verify_peer_name"=> false, ), ); $content = file_get_contents($myurl, false, stream_context_create($arrContextOptions)); but it makes a security hole in the system as mentioned before in another question for the same issue , if I dont use this security hole method , error blows

file_get_contents() and Curl

孤者浪人 提交于 2020-01-05 09:42:04
问题 I am using file_get_contents() php function in my laravel 4.2 code to get profile photo after login through facebook . it worked correctly when I use this $arrContextOptions=array( "ssl"=>array( "verify_peer"=> false, "verify_peer_name"=> false, ), ); $content = file_get_contents($myurl, false, stream_context_create($arrContextOptions)); but it makes a security hole in the system as mentioned before in another question for the same issue , if I dont use this security hole method , error blows

webHttpBinding with certificate

故事扮演 提交于 2020-01-05 09:14:16
问题 I am trying to secure a self hosted service. Calling the service returns this: The underlying connection was closed: An unexpected error occurred on a receive. The service endpoint looks like this <endpoint address="https://MACHINE:8010/rest/users" binding="webHttpBinding" bindingConfiguration="certificate" contract="Online.DomainObjects.Remote.IUserManagerRemote" /> I have done this to open up access: netsh http add urlacl "url=https://+:8010/" user=BUILTIN\Users I have turned WCF tracing on

Encrypting passwords in ASP.NET MVC 3

若如初见. 提交于 2020-01-05 09:03:07
问题 I'm trying to create a custom membership system in ASP.NET MVC3 . I know there are many free and open source providers, but I'm doing this to learn more. My question is about encrypting passwords. Which algorithm do you suggest I use: SHA1 , SHA256 , MD5 , BCrypt , or something else? Also, which way do you suggest to create a password salt? 回答1: BCrypt if you need really strong hash. As far as generating the salt is concerned, you could use the RNGCryptoServiceProvider class. Here's an

Why is my programmatically created user missing from the Welcome screen?

余生长醉 提交于 2020-01-05 08:25:52
问题 I have a program that creates a Windows user account using the NetUserAdd() API which is suggested by Microsoft. The user is created successfully, and I can log in as that user. However, on Windows XP, the newly-created user is missing from the Welcome screen. If I disable the Welcome screen, I can log in as the new user by typing the user name in direcly. What property of the account I create causes it to be omitted from the Welcome screen? 回答1: One thing you could do is add the username as

Securing Update and Delete queries in Solr

拈花ヽ惹草 提交于 2020-01-05 08:13:11
问题 I have a website that displays product information using Solr, and it is managed via the URL. I am curious as to how I would go about preventing regular users from updating or deleting my Apache Solr documents via the URL. I want to get it so only admins can submit these queries. I would assume that there is a way to have a username and password verify that an arbitrary user is an admin, thus allowing for the URL request to modify data. This is useful, but the problem is that I don't want

Java 8 update 161 breaks HTTPClient Kerberos authentication

心已入冬 提交于 2020-01-05 08:09:50
问题 My HTTPClient Kerberos authentication set up is similar to this one. My login.conf looks like this: com.sun.security.jgss.login { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<keytab> principal=<principal>; }; com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<principal> principal=<keytab>; }; com.sun.security.jgss.accept { com.sun

Java 8 update 161 breaks HTTPClient Kerberos authentication

穿精又带淫゛_ 提交于 2020-01-05 08:09:13
问题 My HTTPClient Kerberos authentication set up is similar to this one. My login.conf looks like this: com.sun.security.jgss.login { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<keytab> principal=<principal>; }; com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<principal> principal=<keytab>; }; com.sun.security.jgss.accept { com.sun

A working .NET example using SetEntriesInAcl interop in action

时光总嘲笑我的痴心妄想 提交于 2020-01-05 07:46:30
问题 Does anyone has a working example of invoking SetEntriesInAcl method in .NET using P/Invoke? I keep getting error 87 when invoking it and just cannot get what am I doing wrong. Here are my definitions: private enum FileAccessRights { FILE_READ_DATA = 0x0001, } private enum AccessMode { GRANT_ACCESS = 1, REVOKE_ACCESS = 4, } private enum InheritanceFlags { NO_INHERITANCE = 0x0, } private enum TrusteeForm { TRUSTEE_IS_SID = 0, } private enum TrusteeType { TRUSTEE_IS_USER = 1, } private struct

Where to place login dialog for 3-legged Auth for restful API

时光毁灭记忆、已成空白 提交于 2020-01-05 07:31:12
问题 I'm trying to wrap my head around 3-legged authentication to secure a restful API. Currently I have a client application at app.host.com which needs to be accessed by multiple users with different account permissions and data, as well as the JSON RESTful api which holds all data at app_api.host.com For 3-legged auth, I understand I first need a consumer key and secret belonging to the client app.host.com... I also understand an unauthorized request token must be provided by the service