Segmentation fault on aliasing #660

merged 1 commit into from Jul 2, 2012


None yet
3 participants

fl00r commented Jun 23, 2012

alias_action :show, :to => :show

will cause Segmentation fault.

So we need to validate target names


fl00r commented Jun 26, 2012

Anyone? ;)


ryanb commented Jul 2, 2012

I wonder if the wording should be changed. I don't like using the terms "real action" because in CanCan all actions are the equal, there are just some default aliases in place. I'll pull this in and maybe change it later.

ryanb added a commit that referenced this pull request Jul 2, 2012

Merge pull request #660 from fl00r/master
Segmentation fault on aliasing

@ryanb ryanb merged commit cad4db2 into ryanb:master Jul 2, 2012

nirvdrum commented Feb 7, 2013

This is kind of a big change to slip into a point release. It breaks perfectly fine action aliases that aliased to "real actions", but not recursively.

I'm also dubious that this actually caused a segmentation fault. I could see it causing a SystemStackError, but I'm not convinced it's CanCan's job to prevent people from infinite recursion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment