security

Is it safe to accept self-signed certificates?

无人久伴 提交于 2019-12-25 02:53:13
问题 I have an Android app, and I keep getting javax.net.ssl.SSLException: Not trusted server certificate when I try to use it with my own server with my own self-signed certificate. I am thinking of configuring the Android TrustManager to accept self-signed certificates, or to accept all certificates, so I can debug my app. I've read a bunch of resources on this site about how to do that. Is this safe to do? 回答1: No, this is not safe. It destroys most of the security benefits of SSL/TLS. It

Scripting Local Security Policy

你。 提交于 2019-12-25 02:48:07
问题 On a servers Local Security Policy I need to give a user rights to "Allow logon locally". How do I do that through a script? 回答1: From the Windows 2003 Resource Kit you need to use the ntrights.exe ntrights -u userName +r SeInteractiveLogonRight More details about ntrights here 来源: https://stackoverflow.com/questions/1564979/scripting-local-security-policy

Symfony 4: Cannot access admin roles. Access Denied

时光毁灭记忆、已成空白 提交于 2019-12-25 02:47:30
问题 I'm learning Symfony 4 and try to make follow Symfony 4 Documentation to create an app. I do follow this article to make admin roles. But when I access path /admin , it's always "Access Denied." I read many article in Symfony Documentation page and StackOverflow but can not found the way to solve it. Here is my setting //config/packges/security.yaml security: encoders: App\Entity\User: algorithm: bcrypt providers: our_db_provider: entity: class: App\Entity\User in_memory: memory: users: admin

Storing database credentials in PHP constans and security [duplicate]

偶尔善良 提交于 2019-12-25 02:22:05
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Is it ever ok to store password in plain text in a php variable or php constant? I used to store my db credentials in a PHP file like this: <?php define('HOST', 'localhost'); define('USER', 'db_user'); define('PASS', 'user_pass'); define('DB', 'database'); ?> I use constants but in a recently project, one of the PHP coders said that storing db credentials into constants wasn't secure. I don't get it. I tried to

JavaScript ActiveXObject

淺唱寂寞╮ 提交于 2019-12-25 02:18:34
问题 I have a queastion about ActiveXObject in javascript. I have tryed this code in Mozila FireFox 6.0.2 var AXobj = new ActiveXObject("WScript.Shell"); AXobj.SendKeys(key); But the error console says that ActiveXObject is undefined. After that, I have tryed this: var AXobj = new DOMParser("WScript.Shell"); AXobj.SendKeys(key); But then, the error console says: Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "file

Security and SQLite in android

你。 提交于 2019-12-25 02:11:34
问题 I'm developing a video game for Android. It will be an online game, which would save user's statistics, achievement, objects, etc. in the local SQLite database. Thinking about the security... I read that a user can edit all his/her databases saved in a rooted Android device. I would not want the user to be able to edit the database of the game. So, what can I do? Is there any option to make the DB really secure? Password? Encryption? Thanks 回答1: A determined attacker can get at any data on

Can Facebook Omniauth email address be securely trusted?

孤街醉人 提交于 2019-12-25 02:07:02
问题 I have a traditional Devise user authentication system that simple uses email and password to login. I want to add login with Facebook. I have this mostly working, but I am curious about the security implications of handling an edge case. Let's say this stuff here happens: User is currently unauthenticated, but has an existing account with email "foo@bar.com" User clicks "Login with Facebook", authorizes access from Facebook Facebook calls back to my server showing email as "foo@bar.com" At

Changing headers and saving file

落爺英雄遲暮 提交于 2019-12-25 01:55:34
问题 When I am in example.com/name.php?id=1&image=33 I can see a certain jpg but I cant save it. In chrome dev tools I can see the path to the jpg but I cant access it directly with the url. How can I use wget or curl (or other in php) to save this file? I think I would need to curl the jpg link but sending the info to the server of the path where I can see the image but I just cant do it. If someone knows how to do this please explain with detailed info since I think I am lacking a lot of

How to bypass ODOO security rules given by administrator?

六眼飞鱼酱① 提交于 2019-12-25 01:52:59
问题 how to view settings which is not allowed to view for users in ODOO, for studying purpose only i.e., how to bypass the access rights 回答1: Simply you cannot this is a framework develloped with qualified community. If you can do that why use it at all!!!? The security in odoo is one of the things that make odoo, in the top framewoK league. 来源: https://stackoverflow.com/questions/47193832/how-to-bypass-odoo-security-rules-given-by-administrator

Php-MySql Security approach while INSERT’ing INTO MySql & fetching from MySql to screen

我的梦境 提交于 2019-12-25 01:51:07
问题 My Approach while INSERT’ing INTO MySql I think I read in stackoverflow.com that “if you need escaping or similar action, do it just in time you need” so in the verification pages that I verify the user inputs (null or not check, length check and structural checks (eg: mail structure, custom tags structures); I use the $_POST[''] variables as inputs. During verifications, even in the custom error printing parts, my error messages does not include any of $_POST[''] values in message texts. As