AtomKey in Nitrogen Project API

7 views
Skip to first unread message

LRP

unread,
Jan 18, 2021, 3:00:18 PMJan 18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
The term AtomKey is used throughout Nitrogen API docs. But I can find a definition in the docs or elsewhere on the web.

Can someone please define it?

Would be good to put the definition of terms like this in the docs.

Many thanks,

LRP

Jesse Gumm

unread,
Jan 18, 2021, 3:11:35 PMJan 18
to nitrogenweb
Hey Lloyd,

In this context is really just indicating that it's a Key, and it's generally expected to be an atom (though truthfully, it should really just be "Key", since it doesn't *have* to be an atom).  Key is just the ID of an element from a postback or a key in the URL query string.

-Jesse


--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nitrogenweb/fec6accf-40f7-4e0e-a251-8e6695873db9n%40googlegroups.com.


--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Allan Streib

unread,
Jan 18, 2021, 3:16:49 PMJan 18
to LRP, Nitrogen Project / The Nitrogen Web Framework for Erlang
I would infer that it simply means "a key that is an atom" e.g. in the
documentation for wf:q/1

wf:q(AtomKey) -> String | undefined

Get all query string and POST values for the provided key. If more
than one AtomKey matches, then this will throw an error, use
wf:qs(AtomKey) instead. Returns the atom undefined if there's no
matching value.

Allan

Allan Streib

unread,
Jan 18, 2021, 3:25:15 PMJan 18
to Jesse Gumm, nitrogenweb
Does Nitrogen convert all URL querystring and post element IDs to atoms?
If so is there a potential DoS vulnerability there, i.e. could someone
post a lot of different IDs and exhaust the atom table?

Allan

Jesse Gumm <gu...@sigma-star.com> writes:

> Hey Lloyd,
>
> In this context is really just indicating that it's a Key, and it's generally
> expected to be an atom (though truthfully, it should really just be "Key",
> since it doesn't *have* to be an atom). Key is just the ID of an element from
> a postback or a key in the URL query string.
>
> -Jesse
>
> On Mon, Jan 18, 2021 at 2:00 PM LRP <ll...@writersglen.com> wrote:
>

Jesse Gumm

unread,
Jan 18, 2021, 3:27:17 PMJan 18
to Allan Streib, nitrogenweb
Conveniently, it does not, as that *would* be a huge security flaw.

The IDs and stuff are generally stored internally as binaries or strings inside simple bridge.  Hence why the key doesn't need to be an atom.

-Jesse
Reply all
Reply to author
Forward
0 new messages