[Rails] what to use for sanitize?
Hi, i'm allowing users to upload html stuff, what can i use to sanitize it? h() it's not good as it escape everything, and i've found that the rails sanitize() is too strict, it sanitize also css style attributes, so users cannot personalize their html... i'd like something which permit to include code like youtubbbe embedded, css styles (only inline, not by external link), which strip stuff like html, head and keep just the body, and all the script tags or btw everything which could cause xss and other problems... what do you suggest? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Exception notifier and rails 2.3, does it work?
On 1 Mag, 02:23, Andrew Bloom wrote: > Very strange. Have you checked postfix at all? I use ExceptionNotifier > in 2.3 with no problems at all. yep, there nothing in the log, as rails never pass it to send the mail at the moment of the error (a simple find with a wrong id which thrown an exception not catched), neither in the production.log (i don't know if the plugin notify in the log when it send an email, btw there is nothing). Other emails works without problem both from the website and directly from the console --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Exception notifier and rails 2.3, does it work?
Hi, i've just installed exception notifier, set in the enviroment.rb (i've tried also in an inizializer file and in production.rb in the enviroments folder) ExceptionNotifier.exception_recipients = %w(m...@mail.com) ExceptionNotifier.sender_address = %("Application Error" ) ExceptionNotifier.email_prefix = "[ERROR] " and in the application controller include ExceptionNotifiable local_addresses.clear (i've tried with and without this) deployed the app online with apache+passenger in production env, i went to a page which thrown an error, but i didn't got any email. The app itself can send emails (i use postfix, and for other emails from the same app it works) Any idea why it doesn't work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Rails and Sphinx
> You can send an xml "docset" document to sphinx to build the index; use the > xmlpipe2 source type in your conf and have a script that will generate the > xml to STDOUT. > The docset contains a set of documents with id's (which you might map to the > id in a table in your database if you were using it). Each document contains > a set of field tags with the information you want to index. > I don't know how that squares with large datasets - my app was very small. > I use the Riddle client that comes with Thinking Sphinx to talk to searchd. I'm worried that it would takes quite a long with a lot of records (>2M) :( @Philip: I've seen about delta indexes, and I'll go with them :) From what I've read sphinx is also a lot faster than ferret to rebuild all the indexes :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails and Sphinx
Hi, i'm currently using ferret+acts_as_ferret for doing some searches in the db (not so big for now, just 40k~ records, but they will be near 2M+ soon). For now ferret it's working quite well, but sometimes i've indexes corrupted (i use it's drb server in production) and i've to rebuild all the indexes, so i've bad indexes, angry users and time spent to make it right. I'm looking at sphinx and it seems the answers to this problems, as it seems that it doesn't have this such of problems. But i've seen that i've to remake indexes everytime (/hour or less).. does it take a lot to rebuild them? Is there anyone who use shpinx in production? Another big question about it is if it's possible to create custom indexes without having the records in the db, for example with ferret it's just a :fields => {:my_custom_field => {}} and then a method named my_custom_field which set what i need (for example a list of strings/integers, that i need to index, like category ids "4 8 15 16 23 42", and then doing a query searching with for example 15, or stuff like that (actually i've 8 fields, but soon they will be around 12-15) Is it possible something like this with sphinx? For ferret there is acts_as_ferret, for sphinx what do you suggest ? acts_as_sphinx or is there something else? thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Give own domains to users (shopify like)
@Frederick: thank you, i know about the wildcard record to catch all the requests and give them to a default application. do you know if it's possible to have a structure like this? maindomain.com first.users.maindomain.com second.users.maindomain.com userdomain.com -> third.users.maindomain.com All run the same rails application, but every user have their own subdomain (i can't use a third level like first.maindomain.com because it would be a chaos having other subdomains), and they can have an own domain to point to their subdomain. The wildcard in this case will point to the application, but how tell apache and the rails app that the domain requested is for a given subdomain? Does peter's approach work for external domains too? (obviously the vhost would be both *.users.maindomain.com and * to chatch all external requests and redirect to the right subdomain) @Peter: thank you too, i'll look into account_location.. i think that with subdomains won't be a big problem. instead i'm more worried about user's own domains :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Give own domains to users (shopify like)
Hi, do you have any hint on how give to users the possibility to set an own domain instead of using a subdomain of the app? The best example i've found is how shopify works, they permit to have the shop under shopname.myshopify.com or set an own domain like shopname.com. I don't think they do this manually setting apache vhosts everytime.. The A record of the own domain is the to the myshopify.com, but do you have hany idea on how manage this situation? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---