security

How to disable GIT hooks for security reason?

旧巷老猫 提交于 2020-01-02 16:24:10
问题 If you clone a git repository, the hooks are not cloned for security reasons I suppose. But what if I get a repository by an other way like a ZIP file? How can I make sure there is no hook executed when I run GIT commands on a repository which I don't fully trust? What I can think of, is to remove the executable flag of all files in the .git/hook directory. But according to the documentation, the hooks are only normally stored in this directory so there might be other places to clean first.

Debugging “unsafe javascript attempt to access frame with URL … ”

↘锁芯ラ 提交于 2020-01-02 15:41:54
问题 So, the error message is the security restriction to access a parent frame or window from within an (i)frame from a different domain. (Unsafe javascript attempt to access frame with URL xxx from frame with URL yyy. Domains, protocols, and ports must match). However, there is no line shown in webkit or chrome from where this error is generated. So how do I get a list of the lines that infringe upon this? I know I can just search, but does this apply to cookies as well (document.cookie, etc) ?

Debugging “unsafe javascript attempt to access frame with URL … ”

試著忘記壹切 提交于 2020-01-02 15:40:25
问题 So, the error message is the security restriction to access a parent frame or window from within an (i)frame from a different domain. (Unsafe javascript attempt to access frame with URL xxx from frame with URL yyy. Domains, protocols, and ports must match). However, there is no line shown in webkit or chrome from where this error is generated. So how do I get a list of the lines that infringe upon this? I know I can just search, but does this apply to cookies as well (document.cookie, etc) ?

What encryption procedure I must use to send encrypted 'email' and 'password' values over the HTTP protocol?

大憨熊 提交于 2020-01-02 15:26:40
问题 I am using Ruby on Rails 3 and I would like to send 'email' and 'password' values (I know, I should not, but I need that) over the HTTP protocol. I need to send user credentials from a my client application to a my service application*. I can use a public a private RSA key to accomplish that but, if so, I must don't send the public key to the recipient over HTTP, otherwise an hacker can steal the key and decrypt contents. On other hands, the HMAC encryption (if I understood that) is good only

ASp.NET MVC EF4 SQL Table or Field level security

空扰寡人 提交于 2020-01-02 13:55:55
问题 I have an slightly unusual security requirement, and I'm looking for advice on best practice, or at-least non-brittle approaches. Scenario: Intranet system. Data about a number of related entities is to be considered as private. This is known as the unpublished part of the system. Only certain users can access this data. At some stage the users make a selection from this data, mark some records and publish them to the "published" side. The data published to the published side is removed from

Secure node.js restful API

冷暖自知 提交于 2020-01-02 12:12:31
问题 I'd like to secure a restful Api, and I'm trying to keep it as simple as possible, as well as being stateless. What is the optimal way to store, generate, and authenticate api keys? I was thinking about generating keys with node-uuid, storing them in redis, and then authenticating them with passport-apikeys. Would this work? Or is there another optimal solution that I'm missing. I have been reading up on this a good amount, but a lot of resources are missing the actually implementation, like

Secure node.js restful API

北城以北 提交于 2020-01-02 12:07:39
问题 I'd like to secure a restful Api, and I'm trying to keep it as simple as possible, as well as being stateless. What is the optimal way to store, generate, and authenticate api keys? I was thinking about generating keys with node-uuid, storing them in redis, and then authenticating them with passport-apikeys. Would this work? Or is there another optimal solution that I'm missing. I have been reading up on this a good amount, but a lot of resources are missing the actually implementation, like

Secure node.js restful API

只谈情不闲聊 提交于 2020-01-02 12:07:33
问题 I'd like to secure a restful Api, and I'm trying to keep it as simple as possible, as well as being stateless. What is the optimal way to store, generate, and authenticate api keys? I was thinking about generating keys with node-uuid, storing them in redis, and then authenticating them with passport-apikeys. Would this work? Or is there another optimal solution that I'm missing. I have been reading up on this a good amount, but a lot of resources are missing the actually implementation, like

How to recover a site after an xss attack?

前提是你 提交于 2020-01-02 11:19:27
问题 Recently i was studying about the XSS attacks and how devastating they can be on a website. What surprised me was that, web ( even SO ) is full about how to prevent xss attack but there is no relevant resource on how to recover a website, after it has been attacked through xss . There are some things which i came across like : upload the backup website code back on server download the entire site and manually look for any malicious script but these doesn't sound good enough....i mean, isn't

How to store db connect information is secure?

夙愿已清 提交于 2020-01-02 10:07:53
问题 I developed a php application, and I have a config.php , which store the constant use among the application, in this file, it included all the important information, such as the Mysql server address, port number, user name and passwords. I am worry about someone can get the file, and do something that I don't want, how can I protect this file? Thank you. 回答1: Practice general good password security (don't use dictionary words etc) It is good practice to name the file with a .php extension, as