security

How to provide security to files and folders through C#.NET in FAT File system

て烟熏妆下的殇ゞ 提交于 2020-01-06 14:14:49
问题 I have created a folder lock in C#.NET which is working good on NTFS file system But its not working on FAT file system. please tell which dll/class/namespace should i use to get Lock files and folder on FAT file system through C#.NET sample code which is working with NTFS (below code is to unlock file/folder) FileInfo info = new FileInfo(folderpath); FileSecurity accessControl = info.GetAccessControl(AccessControlSections.All); accessControl.RemoveAccessRule( new FileSystemAccessRule(

Securing application against XSS

江枫思渺然 提交于 2020-01-06 13:07:07
问题 We are currently using OWASP Antisamy project to protect our application against XSS attacks. Every input field is sanitized when any given form is submitted to server. It works fine, but we have issues with the fields like company name, organization name, etc. Ex: Ampersand is escaped for AT&T and the company name is displayed wrong (displayed with escaped characters). We manually update the fields on database to fix this issue. However, this is a pain in the neck as you can imagine. Is

How to restrict/grant read/write access to child process's memory?

泪湿孤枕 提交于 2020-01-06 11:48:58
问题 Is it possible to programmatically adjust a process's privilege so that if it creates a child process at any point later on, it will always(never) have write access to that process's memory? I have created a dll which is loaded by two different processes. At some point in my code I create a process. I have observed that depending upon which process loads my dll, I either have PAGE_EXECUTE_WRITECOPY or 0 access to the child process's memory. My guess is that the loading process must have put

Using Dropbox access token from multiple devices

你。 提交于 2020-01-06 10:22:40
问题 Today - Users' Dropbpox access tokens - which are obtained when a user authenticates the app - are kept in my backend , linked to the authenticated user. So when a user authenticates once from any platform - he will have the same Dropbox access from any other platform or device he uses, since the access token are kept in the backend. We want to allow each client to use the Dropbox SDK in order to communicate directly with Dropbox services where it seems fit, requiring the clients hold an use

Using Dropbox access token from multiple devices

喜欢而已 提交于 2020-01-06 10:21:02
问题 Today - Users' Dropbpox access tokens - which are obtained when a user authenticates the app - are kept in my backend , linked to the authenticated user. So when a user authenticates once from any platform - he will have the same Dropbox access from any other platform or device he uses, since the access token are kept in the backend. We want to allow each client to use the Dropbox SDK in order to communicate directly with Dropbox services where it seems fit, requiring the clients hold an use

restricting file download in PHP

走远了吗. 提交于 2020-01-06 09:08:42
问题 so suppose my server is located in http://www.example.com I then put a file file.exe in the files directory in the root server hence normally you can download that file by typing this into the browser http://www.example.com/files/file.exe And suppose that I have a php script that first authenticates the user and then redirect them to that file.exe download page eg. using this method: header('Location: http://www.example.com/files/file.exe'); exit(0); what is the best way to 1.) prevent

wordpress security and xmlrpc.php

倾然丶 夕夏残阳落幕 提交于 2020-01-06 08:46:12
问题 Looking through my site stats I'm noticing a bunch of hits on my wordpress/xmlrpc.php file. It's not from me afaik, do I need to worry about something here, is there anyway to secure this? I'm running multiple wordpress sites on the same apache2, and it's only one of them that this is happening to. 回答1: If you don't use the xmlrpc interface (pingbacks or blogging from external sources like android/iPhone), you can turn off this feature. Settings -> Writing -> XML-RPC 回答2: I installed "Windows

Invoke Windows Certificate Export Wizard .NET [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 08:27:36
问题 This question already has answers here : How to P/Invoke CryptUIWizExport Function using .NET (2 answers) Closed 6 years ago . Does anyone know how to invoke/display the Windows Certificate Export Wizard Programmatically within C#.NET whilst providing an X509 Certificate? 回答1: I think you'll have to P/Invoke CryptUIWizExport from the Cryptui.dll. 回答2: I don't know, but i do vote for program this wizard in C#. Look at X509Certificate2UI class and X509Certificate2.Export method. You will find

How can one isolate logical layers of an Java EE application

扶醉桌前 提交于 2020-01-06 08:16:19
问题 I'm not really sure if this is actually a real problem or a stupid beginner question. Maybe I have missed some point and this question is rather trivial, so please bear with me. If I got it right, then the difference between layers and tiers is that layers relate to logical separation whereas tiers imply physical separation of portions of an application. One can implement layers as separate tiers to shield the application from users making direct calls e.g. to data access objecs. But my

iOS: trigger NSURLErrorServerCertificateUntrusted instead of NSURLErrorCancelled when failing the AuthenticationChallenge

左心房为你撑大大i 提交于 2020-01-06 07:59:44
问题 I'm handling the server trust authentication challenge in a custom way (comparing the public key from the server trust with a hashed local version) through the urlSessionDelegate, similarly to how it is done here: How do I accept a self-signed SSL certificate using iOS 7's NSURLSession and its family of delegate methods for development purposes? As described in the documentation, I need to cancel the challenge if I want to fail the server trust authentication myself. When doing this, my data