security

deny access to directory listing using htaccess

被刻印的时光 ゝ 提交于 2019-12-24 17:48:00
问题 I want to deny access to particular directory to show list of files in it in the browser. For example, If I go to the url, localhost/myproject/assets, it will show all the list of files in it, I want to deny that. And also if logged in user access specific file in it, for ex : localhost/myproject/assets/uploads/img/1.jpg then it should be accessible. Also how to deny access to a localhost/myproject/assets/uploads/img/1.jpg if that 1.jpg is uploaded by some other user. I'm new to laravel ,Any

secure session management without cookies

ぃ、小莉子 提交于 2019-12-24 16:53:15
问题 Some months ago, I visited a security workshop and we discussed some securitiy problems when using cookies for session management. I was told, that cookies originally were not designed for handling sessions. But how should it be done then? 回答1: A secure way to do this would be to generate a cryptographically random 128 bit value (that is a random value generated by a CSPRNG), and then pass this as POST data to each page. e.g. <form method="post" action="/globalHandler"> <input type="hidden"

secure session management without cookies

天大地大妈咪最大 提交于 2019-12-24 16:53:02
问题 Some months ago, I visited a security workshop and we discussed some securitiy problems when using cookies for session management. I was told, that cookies originally were not designed for handling sessions. But how should it be done then? 回答1: A secure way to do this would be to generate a cryptographically random 128 bit value (that is a random value generated by a CSPRNG), and then pass this as POST data to each page. e.g. <form method="post" action="/globalHandler"> <input type="hidden"

Cloudkit Security Roles

放肆的年华 提交于 2019-12-24 16:52:27
问题 The only use I can see for Security Rolls in CloudKit is granting another team member access to the cloudkit Dashboard in order to modify the tables in the dashboard? Is this correct, or am I missing something? Currently I am the only one who can login to the dashboard and I can't add another team Member. I think this is because I am registered as a single developer with Apple? I was hoping to use this to set up some type of security on the public database but it seems that I can't do that

Printing SecKeyRef reference using NSLog in Objective-C

醉酒当歌 提交于 2019-12-24 16:44:15
问题 I am retrieving public key from a certificate with the following code. - (SecKeyRef) extractPublicKeyFromCertificate: (SecIdentityRef) identity { // Get the certificate from the identity. SecCertificateRef myReturnedCertificate = NULL; OSStatus status = SecIdentityCopyCertificate (identity, &myReturnedCertificate); if (status) { NSLog(@"SecIdentityCopyCertificate failed.\n"); return NULL; } SecKeyRef publickey; SecCertificateCopyPublicKey(myReturnedCertificate, &publickey); NSLog(@"%@",

How to change clients' site dynamically?

寵の児 提交于 2019-12-24 16:35:17
问题 So, going from the discussion here where I was soundly rebuked and for good reason. I want to give clients unique code snip-its that allow me to change a banner ad without requiring them to FTP anything or change their site. Security is clearly a concern. The ad is code, not an image, as we are testing multiple ad networks. So, to summarize: -client gets a couple lines of code for each place on their site an ad is placed -I insert code from ad network (adsense, etc) or our own ad for the

Why is my applet throwing an AccessControlException?

眉间皱痕 提交于 2019-12-24 16:35:06
问题 I am trying to build a Java applet, called game , which is something I have never done before (I've always just built standalone applications). My applet works fine when I test it in Eclipse, but when I try putting it on my website, I get the following error in the console: java.lang.reflect.InvocationTargetException at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(DeployAWTUtil.java:116) at sun.plugin2.applet.Plugin2Manager.runOnEDT(Plugin2Manager.java:3541) at sun.plugin2.applet

Configuring WebAPI for Forms Authentication

南笙酒味 提交于 2019-12-24 16:26:38
问题 I'm working with webApi and trying to implement forms auth. My application is using simpleMembership. For some reason my controllers are reverting to my windows credentials to check and see if a request is authenticated, when it should just be using simpleMembership against my app's database: I've disabled windows and anonymous auth in the app and in my applicationhost config file... what else needs to be done? 回答1: In your API Controllers, when you need to enforce authentication (non-public

Is there a way to make <g:link calls POST instead of GET?

柔情痞子 提交于 2019-12-24 16:23:15
问题 I'm using a <g:link ... tag for a button that I would like to send as POST instead of GET for security reasons. Is there a way to do this? I cannot use <g:actionSubmit because I'm using Twitter Bootstrap's Glyphicons (i.e. I need to put the icon in between the tag, it can't go in a value attribute) <g:link class="btn btn-success" action="someAction" id="class.id"> <i class="icon-ok"></i> Save </g:link> So, I need a link that I can pass the ID as POST and includes a tag structure like: <g

Preventing man in the middle attack while using https

无人久伴 提交于 2019-12-24 16:21:14
问题 I am writing a little app similar to omegle. I have a http server written in Java and a client which is a html document. The main way of communication is by http requests (long polling). I've implemented some sort of security by using the https protocol and I have a securityid for every client that connects to the server. When the client connects, the server gives it a securityid which the client must always send back when it wants a request. I am afraid of the man in the middle attack here,