security

PHP user input data security

和自甴很熟 提交于 2019-12-24 12:34:01
问题 I am trying to figure out which functions are best to use in different cases when inputting data, as well as outputting data. When I allow a user to input data into MySQL what is the best way to secure the data to prevent SQL injections and or any other type of injections or hacks someone could attempt? When I output the data as regular html from the database what is the best way to do this so scripts and such cannot be run? At the moment I basically only use mysql_real_escape_string();

Symfony2 JWT Authentication Returning 404 on Preflight

南楼画角 提交于 2019-12-24 12:29:06
问题 I've just implemented the Symfony2 LexikJWTAuthenticationBundle, and when I attempt to authenticate a user, I keep getting the following response, XMLHttpRequest cannot load http://api.example.trunk/api/login_check. Response for preflight has invalid HTTP status code 404 What's weird, is that the request does work via Postman, and I get a token, so I'm thinking that this could have something to do with CORS? I have honestly googled and researched every possible thing I could think of, but I

How can I log user name when SQL Server database on different server than web server?

亡梦爱人 提交于 2019-12-24 12:18:16
问题 I have created ASP.NET web forms for editing data and the underlying database tables have associated audit tables with the user name, date, and changed data that are filled using triggers. The SQL Server database is on a different server than the web server. The requirement is that the individual user names be logged in the audit tables. The only way I found to do this is the following: • SQL Connection string specifies Integrated Security, and • IIS Authentication specifies ASP.NET

OAuth 2.0 Authorization Server and Access Tokens

天涯浪子 提交于 2019-12-24 12:03:46
问题 I'm currently studying OAuth 2.0 and OpenID Connect and I have a doubt regarding the Authorization Server and Access Tokens. The spec defines the Authorization Server as: The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization. So as I understood, the client redirects the user to the Authorization Server, the user authenticates itself at the Authorization Server and the Authorization Server issues an access token to the

pywin32-220 installer “high risk” file

时光怂恿深爱的人放手 提交于 2019-12-24 11:55:22
问题 When I try to install pywin32-220 it will be stopped by Norton saying that it's threat name "SONAR.Heuristic.132" and a "High risk file". It removes the pywin32-220 installer... So how can I get pywin32? Pywin32 download - http://sourceforge.net/projects/pywin32/files/?source=navbar SONAR.Heuristic.132 threat: (Norton link to details) http://www.symantec.com/security_response/writeup.jsp?docid=2015-061517-5721-99&vid=4294925827&product=Norton%20Internet%20Security&version=22.5.5.15&plang=sym

How can I filter data in an Apex Grid to show certain things for certain user groups?

一世执手 提交于 2019-12-24 11:49:18
问题 I have an ADMIN group and a USER group. My data looks something like this raw: ID ---------- NAME --------- SECTOR 0001 John A 0002 John H 0024 John A 0011 John H 0045 John A The ADMIN group should only be able to see A, and the USER group should only be able to see H. How can I customize the gridview in Apex to filter it based on authorization/groups? 回答1: Since you are using APEX built-in groups, there is a function APEX_UTIL.GET_GROUPS_USER_BELONGS_TO that can help you here. It returns a

Postback Security

大城市里の小女人 提交于 2019-12-24 11:42:42
问题 I've been working with jQuery and *.asmx web services lately, and I'm trying to be security-conscious in doing so. I figure it would be possible to submit an AJAX request -- even when logged-out -- to a resource that should only be accessible while logged-in. Thus, I include special keys and hashes with each of these AJAX requests in order to validate the user's state before performing certain server-side actions. HOWEVER I always assumed that Postbacks were safe in that regard. That .NET

Can one break a secury manager with sun.misc.unsafe?

家住魔仙堡 提交于 2019-12-24 11:35:20
问题 Following a conversation on another question, an interesting issue is being raised. Classes loaded with a security manager are protected with the corresponding security. This security could disable reflection (for example). The question is: is it possible to break a security manager with sun.misc.unsafe? If yes, how? EDIT Changed SecuredClassLoader to Security Manager in question. 回答1: No. The sun.misc.Unsafe class requires an access check just like any other privileged action. You can block

Self-signed applet doesn't get a full permission

╄→尐↘猪︶ㄣ 提交于 2019-12-24 11:29:54
问题 I've googled lots of links like oracle and velocity review and stackoverlow too, but still no success. The point is simple. Jar is signed using: keytool -genkey -alias signFiles -keystore compstore -keypass bca321 -dname "cn=test" -storepass abc123 jarsigner -keystore compstore -storepass abc123 -keypass bca321 -signedjar SignedJar.jar UnsignedJar.jar signFiles And it runs perfectly on local machine. But when SignedJar.jar is used like an applet via HTTP(S), even if user accepts certificate

Authentication and Authorization on web server ?

若如初见. 提交于 2019-12-24 11:29:31
问题 I am building an android application which communicates with the web server on apache tomcat. Web server build in JAVA EE. Currently for authentication and authorization I am using username , password and for managing the session I am using tokens. So when the user logs in I will check mysql database and authenticate the user. When the user tries to do some action , based on the token the sent , I will identify the user and authorize to do that action based on the privileges given to that