whitelist

Google API: Not a valid origin for the client: url has not been whitelisted for client ID “ID”

半世苍凉 提交于 2019-11-29 23:29:02
I need help. I don't found an answer to my question. I tried googling and I tried asking on other sides but I never found an answer. I'm working with the google API (Youtube data API) and I use the example code from the google side the code it works I'm pretty sure about that. I got an error when i try to start the Script: details: "Not a valid origin for the client: "MyURL" has not been whitelisted for client ID "MyID". Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID." error: "idpiframe_initialization_failed" The problem i whitelisted

blacklisting vs whitelisting in form's input filtering and validation

拟墨画扇 提交于 2019-11-29 14:48:01
which is the preferred approach in sanitizing inputs coming from the user? thank you! I think whitelisting is the desired approach, however I never met a real whitelist HTML form validation. For example here is a symfony 1.x form with validation from the documentation : class ContactForm extends sfForm { protected static $subjects = array('Subject A', 'Subject B', 'Subject C'); public function configure() { $this->setWidgets(array( 'name' => new sfWidgetFormInput(), 'email' => new sfWidgetFormInput(), 'subject' => new sfWidgetFormSelect(array('choices' => self::$subjects)), 'message' => new

How often can MS Azure App Services Outbound IP addresses change?

China☆狼群 提交于 2019-11-29 10:55:01
I'm using Azure App Services that calls an external API that uses white-listing of IP addresses for defense-in-depth protection. I'm aware I can find my Outbound IP addresses of my App Services under the WebApp -> Settings -> Properties -> Outbound IP addresses (showing a list of 4 comma separated IP addresses) which can be supplied to the external API whitelist. I understand Microsoft publishes a regularly updated list of Azure datacenter's IP addresses for outbound traffic that I can whitelist: https://www.microsoft.com/en-us/download/details.aspx?id=41653 The issue is the external API can

.NET HTML whitelisting (anti-xss/Cross Site Scripting)

本小妞迷上赌 提交于 2019-11-29 07:33:31
I've got the common situation where I've got user input that uses a subset of HTML (input with tinyMCE). I need to have some server-side protection against XSS attacks and am looking for a well-tested tool that people are using to do this. On the PHP side I'm seeing lots of libraries like HTMLPurifier that do the job, but I can't seem to find anything in .NET. I'm basically looking for a library to filter down to a whitelist of tags, attributes on those tags, and does the right thing with "difficult" attributes like a:href and img:src I've seen Jeff Atwood's post at http://refactormycode.com

How do you filter a string such that only characters in your list are returned?

徘徊边缘 提交于 2019-11-29 03:01:20
Imagine a string, like 'Agh#$%#%2341- -!zdrkfd' and I only wish to perform some operating on it such that only the lowercase letters are returned (as an example), which in this case would bring 'ghzdrkfd'. How do you do this in Python? The obvious way would be to create a list, of characters, 'a' through 'z', then iterate over the characters in my string and build a new string, character by character, of those in my list only. This seems primitive. I was wondering if regular expressions are appropriate. Replacing unwanted characters seems problematic and I tend to prefer whitelisting over

Phonegap/Cordova whitelisted cross domain SSL request not working after exporting APK

耗尽温柔 提交于 2019-11-29 02:26:22
I have created a phonegap app which needs to communicate with a self signed SSL service. I whitelisted my url in res/xml/cordova.xml like so: <access origin="https://www.mydomain.com" subdomains="true" /> and this works fine when I run and build from eclipse but if I then export and sign my app and manually install the APK then the app is unable to communicate with my web service. The communication with the server is carried out using the Sencha Touch library like so: Ext.Ajax.request({ url: 'https://www.mydomain.com', method: 'get', success: function(result) { }, failure: function(result) { }

javascript limit text input characters

亡梦爱人 提交于 2019-11-28 12:16:14
问题 I am wanting to restrict the input characters for a text box to [a-z0-9_-]. However whenever if do this buttons like backspace and the arrow keys don't work. I have found some attempts on this website and others but either they don't work properly on all browsers or they use a black list. For example the W3Schools website example black lists numbers. Is there a way to use white list (the one above) and still allow keys like backspace, arrows, home, end etc? Or do i have to add everyone of the

IP Address Block of Appengine Servers?

Deadly 提交于 2019-11-28 09:06:52
I'm working with a third party webservice who requires that all calls to their service are made from whitelisted IP addresses. That is, I must give them IP addresses from which I will be making calls to their service. Problem is I'm using Google Appengine. Is there any way to get a static IP address when making outgoing http requests from Appengine? Failing that - is there a block of IP addresses that all requests will come from? I could get the entire bloc whitelisted. If this exists, how likely is it to change? I know I could setup a simple Amazon EC2 instance to use as a proxy (will ask

Whitelisting with devise

北战南征 提交于 2019-11-28 07:48:18
I am using devise to manage user authentication in my rails app. Devise is really great for that. However I have a special requirement for my application: A user must be whitelisted before he can register as a User. So there is a admin which creates a list of allowed emails. A user registers with a email and if the email is in the whitelist table he will be registered. If however, the mail is not in the whitelist, the registration should be aborted with a message like "You are not yet invited". Do you have an idea how that could be solved with devise? Thanks in advance. What you can do is

How often can MS Azure App Services Outbound IP addresses change?

落花浮王杯 提交于 2019-11-28 04:05:13
问题 I'm using Azure App Services that calls an external API that uses white-listing of IP addresses for defense-in-depth protection. I'm aware I can find my Outbound IP addresses of my App Services under the WebApp -> Settings -> Properties -> Outbound IP addresses (showing a list of 4 comma separated IP addresses) which can be supplied to the external API whitelist. I understand Microsoft publishes a regularly updated list of Azure datacenter's IP addresses for outbound traffic that I can