ring

EmmanuelOga 2020-05-24T06:59:50.068400Z

I wonder if ring apps are generally vulnerable to keyword attacks... looking at https://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/keyword_params.clj#L15 it looks like an attacker could request random url parameters repeatedly until filling the java process memory with interned keywords. I remember a similar attack on ruby/rails and symbols

mpenet 2020-05-24T08:10:47.070Z

I think they're interned into a weakmap, so they'd be gc

☝️ 1
mpenet 2020-05-24T08:11:26.071100Z

So it would just cause some gc churn, not a memory leak

mpenet 2020-05-24T08:12:16.072300Z

If i recall correctly what you mention was an issue early on, like clj 1.1 or stg

kwladyka 2020-05-24T18:38:55.075400Z

How to create prefix for URIs? I mean <https://example.com/> which can be whatever.

:server-port
  :server-name
  :schema
I was thinking about values above, but I am not sure how ring determine :server-name. Let’s say it will be in docker in k8s cluster. What will be this value then? How are you doing this? I have to return URLs to files on the server and I wanted keep it simple and not create additional configuration for host domain.

kwladyka 2020-05-24T18:39:10.075800Z

Can I use server-name for this purpose without issues?

kwladyka 2020-05-24T18:41:27.076100Z

What is the best practice?

Franklin 2020-05-24T19:09:08.076500Z

I'm looking for documentation/example on uploading files to a server using reitit and ring... please point me to the direction of such a resource if you know of any, thanks

Franklin 2020-05-24T19:13:59.076600Z

I have spent hours trying to figure out how to do this.... you could even point me to what documentation I should read 😢

ikitommi 2020-05-24T19:34:04.077900Z

all reitit swagger-examples have upload implemented