whitelist

How to use whitelists and prepared-statements with Postgresql in php?

社会主义新天地 提交于 2019-12-24 00:34:22
问题 I understand that I need to implement whitelists and prepared-statements into my php code. But I'm not sure how to do this with Postgresql and is it really necessary for my code? I'm using select lists to pass the users selected values to the query. <?php include "connect.php"; $table = $_POST['tableSelected']; $field = $_POST['fieldSelected']; $attribute = $_POST['attributeSelected']; $operator = $_POST['operatorSelected']; $fieldList = $_POST['fieldList']; $fieldstr = $fieldList . ",ST

Is it wise to use jQuery for whitelisting tags? Are there existing solutions in JavaScript?

拟墨画扇 提交于 2019-12-23 19:12:02
问题 My problem I want to clean HTML pasted in a rich text editor (FCK 1.6 at the moment). The cleaning should be based on a whitelist of tags (and perhaps another with attributes). This is not primarily in order to prevent XSS, but to remove ugly HTML. Currently I see no way to do it on the server, so I guess it must be done in JavaScript. Current ideas I found the jquery-clean plugin, but as far as I can see, it is using regexes to do the work, and we know that is not safe. As I've not found any

Are there any alternatives to ICRA for self-regulated content labeling of websites?

早过忘川 提交于 2019-12-23 15:07:48
问题 I'm working with a gambling website that historically has labeled itself using the ICRA Vocabulary expressed with RDF and PICS labeling. Its my understanding that these labels were interpreted by systems such as Internet Explorer 6 Content Advisor to block website access. Unfortunately, the ICRA labeling scheme seems to be defunct as evidenced by the ICRA Homepage. the ICRA labeling engine has been discontinued. While all current labels will continue to work with Internet content filters, the

JSOUP - How to get list of disallowed tags found in html?

烈酒焚心 提交于 2019-12-23 01:12:20
问题 I use JSoup to secure rich text areas against harmful code. How do I get a list of all the disallowed tag/code found in the string passed to JSoup's parse, clean or isValid functions? I use ColdFusion and can parse the text with JSoup like this: var jsoupDocument = application.jsoup.parse( this.Description ); How do I get a list with JSoup 's getErrors() function to see which HTML does not comply to my whitelist.relaxed() ? 回答1: I don't believe there's a direct function in jsoup to get a list

Cordova whitelist iOS 10 SSL error: Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made

不想你离开。 提交于 2019-12-20 07:28:10
问题 I am trying to send an ArrayBuffer to https://1511921174.cloud.vimeo.com/upload?ticket_id=xxxxxxxxxx&video_file_id=xxxxxx&signature=xxxxxxxx=1%22 In iOS 10 nothing is happening. There must me a whitelisting error. I am whitelisting *.vimeo.com and *.cloud.vimeo.com per the cordova-plugin-whitelist docs. Everything works fine in iOS 9 and on Android. <access origin="http://*.vimeo.com" subdomains="true" /> <access origin="https://*.vimeo.com" subdomains="true" /> <access origin="http://*.cloud

Sanitisation on user input using whitelist

谁说胖子不能爱 提交于 2019-12-20 03:17:08
问题 I have this code which sanitises user input on a variable called 'username': $username_clean = preg_replace( "/[^a-zA-Z0-9_]/", "", $_POST['username'] ); if (!strlen($username_clean)){ die("username is blank!"); I want to carry out the same process on each input on this page but I have about 12 different inputs since it is a registering form. Is there an easier way to sanitise and check each input instead of applying preg_replace() and the if statement on each one? 回答1: If you want to

PhoneGap external hosts wildcard

五迷三道 提交于 2019-12-19 04:15:20
问题 I'm using a js library inside a PhoneGap application for iPhone. I don't know what other external sites my js library contacts, so I need a way of whitelisting all connections, just for testing. How do I do that? My app just silently fails, it doesn't continue from where the library is initiated. (when I run the app in a browser it works perfectly) 回答1: Try setting the value of the ExternalHosts property in Phonegap.plist to * 回答2: i think you need to add the domain names to PhoneGap.plist

PhoneGap external hosts wildcard

戏子无情 提交于 2019-12-19 04:15:00
问题 I'm using a js library inside a PhoneGap application for iPhone. I don't know what other external sites my js library contacts, so I need a way of whitelisting all connections, just for testing. How do I do that? My app just silently fails, it doesn't continue from where the library is initiated. (when I run the app in a browser it works perfectly) 回答1: Try setting the value of the ExternalHosts property in Phonegap.plist to * 回答2: i think you need to add the domain names to PhoneGap.plist

Google App Engine - urlFetch address not in _netblocks.google.com

爷,独闯天下 提交于 2019-12-13 15:59:53
问题 For software I am developing, I need to have a list of external IP addresses that Google App Engine uses for urlFetch requests. Getting a complete list is proving difficult. The accepted wisdom as detailed on SO is to use the output from... dig -t txt _netblocks.google.com ...but unfortunately this list is incomplete. For example, my urlFetch requests currently emerge from unlisted addresses: US based App: 8.35.201.x EU based App: 8.35.200.x Is there any way to get an actively updated list of

PHP as template engine stored in Mysql - Whitelist Functions

巧了我就是萌 提交于 2019-12-13 07:49:24
问题 While I have been reading through countless posts about using PHP as a template engine (using output buffering), I'm still trying to make a case for it. As I'm wondering if I could use PHP as a template engine for a web app (users will be able to change the layout themselves) -- I still don't find any info regarding the following: Store the templates in a MYSQL database Eval them BUT only include functions that are whitelisted (to give them only access to a limited set of functions -- while,