Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't use Atom.to_string #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cheerfulstoic
Copy link

Using the recommended approach for LiveView when you need string keys which is to have a nested map: https://elixirforum.com/t/is-there-a-way-of-using-strings-for-assigns-keys/55459

Avoiding using String.to_atom because it is a security / stability problem. See: https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/atom_exhaustion

Using the recommended approach for LiveView when you need string keys which is to have a nested map: https://elixirforum.com/t/is-there-a-way-of-using-strings-for-assigns-keys/55459

Avoiding using String.to_atom because it is a security / stability problem.  See: https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/atom_exhaustion
@cheerfulstoic
Copy link
Author

(love this library, by the way. Thanks so much for it!)

@cheerfulstoic
Copy link
Author

Oh, also, I was having trouble with the dependencies. You might want to specify jason as >= 1.3.0 instead of ~> 1.3.0 to give applications using your library the flexibility to use newer versions of jason. Also I had to use a json_diff_ex specification of >= 0.6.0 for some reason, not sure why 🤷

@cheerfulstoic
Copy link
Author

👋 Was just coming back to this for a bit. Can I help do a bit of maintenance? I colleague was looking at wasn't able to use the library because there is a bug with older versions of json_diff and so they can't update the version in the app because this library uses ~> 0.5.3, so the dependency can't be updated to fix it

The error, by the way:

All dependencies are up to date
    error: undefined variable "package"
    │
 10 │      package: package,
    │               ^^^^^^^
    │
    └─ /Users/hernan/projects/electrofrenetic/deps/json_diff_ex/mix.exs:10:15: JsonDiffEx.Mixfile.project/0

    error: undefined variable "deps"
    │
 16 │      deps: deps]
    │            ^^^^
    │
    └─ /Users/hernan/projects/electrofrenetic/deps/json_diff_ex/mix.exs:16:12: JsonDiffEx.Mixfile.project/0

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.

1 participant