noosfero | I395 username with dot comment paragraph (#492)

Evandro Jr gitlab at gitlab.com
Fri Mar 6 10:59:24 BRT 2015


New comment for Merge Request 492

https://gitlab.com/noosfero/noosfero/merge_requests/492#note_925563


Evandro Jr

This "If" bellow will never be TRUE since it compares "profile" and "myprofile" that are "strings", with "folder" that is a :Symbol 

```ruby
if %w[profile myprofile].include?(folder)
```

The code that sanitize dots inside the profile name is nested in the IF that is always false:

:profile => /#{Noosfero.identifier_format}/

Therefore it will screw any plugin routes that pass username.with.dots since it will never be executed.

```ruby
match "#{prefixes_by_folder[folder]}/#{plugin_name}/#{controller_name}(/:action(/:id))", :controller => controller, :profile => /#{Noosfero.identifier_format}/
```

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150306/5fec9da8/attachment.html>


More information about the Noosfero-dev mailing list