security

Django sql injection protection

旧城冷巷雨未停 提交于 2020-01-07 01:39:06
问题 Is it necessary to do custom cleaning of form data received from fields where the user is limited to selecting from pre-defined valid choices? For example radio buttons, choicefields, etc. I have a situation where a database select is performed but the columns used in that select are defined by the user. The user is presented with pre-defined valid choices (radio buttons, choicefields) which represent table columns. When that form is received do I need to do custom cleaning of that data to

Why is the string specified in `LD_PRELOAD` loaded on the memory of setuid executables in RedHat 6.2?

我与影子孤独终老i 提交于 2020-01-06 19:54:44
问题 First of all, let me tell you the context. I'm solving problems of the wargame called The lord of the BoF , which is based on RedHat Linux 6.2 , which has no address space layout randomization(ASLR) , NX bit , ASCII armor , etc.. And the gcc there does not make any dummy when it compiles code. When I was trying to solve the problem called golem , I wondered something. The solving log This is the source code of the golem . As you can see, it fills the entire stack with 0 , except for the

Update IIS 6 IP Restrictions using command line

有些话、适合烂在心里 提交于 2020-01-06 19:50:48
问题 I found the command line below that is used to add IP addresses to restrict in IIS 7 appcmd set config /section:ipsecurity /+"[ipaddress='10.0.0.1',allowed='false']" Is there an equivalent command for IIS 6? Thanks! 回答1: No, there's no built-in Windows command to do it. You can find evidence of scripts that people have written to mitigate for this. Ultimately, you want to modify a metabase entry called IPSecurity . Here's the thing: this IPSecurity entry can be set up at the top level (W3SVC

Restlet client on Java 1.7 xml parse error “FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present.”

我的未来我决定 提交于 2020-01-06 19:09:14
问题 EDIT : 31/OCT/2014 The fix for this is now available in both Restlet 2.2 and master (future 2.3) branches Our Netbeans Platform Restlet client app runs okay on Java 1.6 but with 1.7.0_11, I get security runtime errors. Is there a easy way to prevent this? WARN org.restlet.log():241 - Unable to unmarshal the XML representation javax.xml.bind.JAXBException: Unable to create customized SAX source - with linked exception: [javax.xml.parsers.ParserConfigurationException: FEATURE_SECURE_PROCESSING:

Security of bcrypt iterations/cost parameter

五迷三道 提交于 2020-01-06 15:48:10
问题 Fact A. Based on Pigeonhole Principle, every hash functions has infinite number of collisions, even if none is found yet. Fact B. Re-hashing a hash, like hash(hash(password)) is not more secure than hash(password), actually hash(hash(password)) open up a collision attack that is not possible with hash(password). Fact C. Based on B, by increasing iterations, we reach a point that most passwords and salts will return same constant hash value. I mean probability of colliding will be high, even

how can i use AntiForgeryToken with JSON post in mvc 4

痴心易碎 提交于 2020-01-06 15:41:31
问题 I have jQuery code that post data with JSON.stringify to controller class but when I used AntiForgeryToken, it doesn't work.. is any better way to secure JSON post or I am missing out something.... secondly do i need additional to this .. i.e. encryption to secure JSON data... many thanks for help in advanced... <script type="text/javascript"> $(document).ready(function () { $('#id_login_submit').click(function () { var _authetication_Data = { _UserName: $('#u1').val(), _Password: $('#p1')

grant access to Location to framed external site

此生再无相见时 提交于 2020-01-06 15:21:34
问题 I'm iframing an external site. That site tries to call location from parent for analytics reasons and access is refused (for obvious default security reasons) . Yet I would like to disable that security and answer, because that site is a 'friend' but not on the same domain. Seems impossible to grant that access... any idea ? 回答1: I ran into a similar situation before. Allowing for cross domain javascript access through iframes is not possible since this would result in a cross-scripting

Is this site vulnerable to an SQL injection attack? [closed]

依然范特西╮ 提交于 2020-01-06 15:14:32
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I am visiting a site and I mistakenly entered a single quote while I was trying to hit the enter key. The URL that got sent is: http://www.domain.tld

securing my admin page that accesses several php files

 ̄綄美尐妖づ 提交于 2020-01-06 15:06:46
问题 I'm completely new to the security side of things. I have a website with an admin page, admin.php that accesses several .php files which do work for me updating databases etc. So with my admin page I can secure my login using something like: <?php define('SALT_LENGTH', 9); function generateHash($plainText, $salt = null) { if ($salt === null) { $salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH); } else { $salt = substr($salt, 0, SALT_LENGTH); } return $salt . sha1($salt . $plainText); }

How does Grails handle security, and why should I use a plugin?

我怕爱的太早我们不能终老 提交于 2020-01-06 14:21:12
问题 For 90% of every security-related Grails tutorial, they tell you to store your User objects in a session-scoped variable. That's all nice and easy, but I wonder if it's too good to be true, especially with plugins like Spring Security that offer many times more features. For the simple, "I am a user and therefore I am entitled to view/edit my own domain objects" applications that I develop, I store my User objects in a session. However, this got me thinking how Grails supports J2EE security