Skip to content

Cast array input to integer node value as nil#1565

Merged
scarroll32 merged 1 commit intoactiverecord-hackery:mainfrom
jdufresne:cast-to-int
Jun 7, 2025
Merged

Cast array input to integer node value as nil#1565
scarroll32 merged 1 commit intoactiverecord-hackery:mainfrom
jdufresne:cast-to-int

Conversation

@jdufresne
Copy link
Contributor

Ensure malformed or malicious user input doesn't crash the Rails page.

Previously, when a user submits a non-empty array, it would raise the exception:

NoMethodError: undefined method 'to_i' for an instance of Array

Fixes #1556

Ensure malformed or malicious user input doesn't crash the Rails page.

Previously, when a user submits a non-empty array, it would raise the
exception:

```
NoMethodError: undefined method 'to_i' for an instance of Array
```

Fixes activerecord-hackery#1556
@scarroll32 scarroll32 merged commit 83b0c9e into activerecord-hackery:main Jun 7, 2025
24 checks passed
@scarroll32
Copy link
Member

Thanks for your contribution!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NoMethodError undefined method 'to_i' for an instance of Array

2 participants