security

how to enable cross domain POST-ing in PHP?

泄露秘密 提交于 2020-01-21 06:27:27
问题 I'm tying to send POST data from one site to another (both sites have been developed by us). The problem is that the POST variables are not available if the page is requested from another domain. Even if I test it locally, but specify the complete url, the POST data is gone. So, this will work: <form method="POST" action="test.php"> But this will not: <form method="POST" action="http://example.com/test.php"> Here is the HTML for the page: <html> <head> <title></title> </head> <body> <form

Encrypt only the content of an image file not entire file

邮差的信 提交于 2020-01-21 05:52:46
问题 I am creating an APP and need to encript only the content of an image. I need that the file was still an image after conversion, but the image showed does not show as the original. For example, I will send the image encrypted to other user and this one will be able to show and image (but not the original), but the original image was encrypted in that file. With the following algorythm I encrypted the entire file, and this cannot be opened as image due the header is encrypted as well. I am

Sensitive Data In Memory

。_饼干妹妹 提交于 2020-01-21 03:59:46
问题 I'm working on a Java password manager and I currently have all of the user's data, after being decrypted from a file, sitting around in memory at all times and stored plainly as a String for displaying in the UI etc. Is this a security risk in any way? I'm particularly concerned with someone "dumping" or reading the computer's memory in some way and finding a user's naked data. I've considered keeping all sensitive pieces of data (the passwords) encrypted and only decrypting each piece as

PasswordVault security when used from Desktop app

假装没事ソ 提交于 2020-01-21 01:14:48
问题 I'd like to use Windows.Security.Credentials.PasswordVault in my desktop app (WPF-based) to securely store a user's password. I managed to access this Windows 10 API using this MSDN article. I did some experiments and it appears that any data written to PasswordVault from one desktop app (not a native UWP app) can be read from any other desktop app. Even packaging my desktop app with Desktop Bridge technology and thus having a Package Identity does not fix this vulnerability. Any ideas how to

PasswordVault security when used from Desktop app

佐手、 提交于 2020-01-21 01:14:17
问题 I'd like to use Windows.Security.Credentials.PasswordVault in my desktop app (WPF-based) to securely store a user's password. I managed to access this Windows 10 API using this MSDN article. I did some experiments and it appears that any data written to PasswordVault from one desktop app (not a native UWP app) can be read from any other desktop app. Even packaging my desktop app with Desktop Bridge technology and thus having a Package Identity does not fix this vulnerability. Any ideas how to

Why should I Sign my Application APK before release

徘徊边缘 提交于 2020-01-20 16:57:21
问题 Can anybody please inform what is the exact importance of signing an APK before releasing. 回答1: From the Android Documentation for Signing Applications: The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. The Android system uses the certificate as a means of identifying the author of an application and establishing trust relationships between applications. The certificate is not used to

Executing mathematical user code on a python web server, what is the simplest secure way?

北城余情 提交于 2020-01-20 02:47:52
问题 I realise this question has been asked before, however this case is slightly different. I want to run a python imageboard (using web.py), that will allow users to generate new images by submitting code. The code will be of the form of a single function that takes the x,y coordinates of a pixel and returns the r,g,b values, eg: def simpleGradient(xrel,yrel): r = xrel*256 g = yrel*256 b = 0 return [r,g,b] Only a very small syntax is required, and it doesn't necessarily have to be python. Using

Executing mathematical user code on a python web server, what is the simplest secure way?

南楼画角 提交于 2020-01-20 02:45:05
问题 I realise this question has been asked before, however this case is slightly different. I want to run a python imageboard (using web.py), that will allow users to generate new images by submitting code. The code will be of the form of a single function that takes the x,y coordinates of a pixel and returns the r,g,b values, eg: def simpleGradient(xrel,yrel): r = xrel*256 g = yrel*256 b = 0 return [r,g,b] Only a very small syntax is required, and it doesn't necessarily have to be python. Using

Read file:// URLs in IE XMLHttpRequest

梦想的初衷 提交于 2020-01-19 11:12:26
问题 I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL). As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page. This code works fine ("PASS") when executed on a web server, but doesn't work ("FAIL") in Internet Explorer 8 when run off the file system: <html><head> <script> window.onload = function() { var xhr = new XMLHttpRequest

Read file:// URLs in IE XMLHttpRequest

孤人 提交于 2020-01-19 11:12:18
问题 I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL). As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page. This code works fine ("PASS") when executed on a web server, but doesn't work ("FAIL") in Internet Explorer 8 when run off the file system: <html><head> <script> window.onload = function() { var xhr = new XMLHttpRequest