This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-25
Channels
- # announcements (4)
- # asami (26)
- # babashka (82)
- # beginners (27)
- # biff (6)
- # boot (1)
- # calva (42)
- # cider (2)
- # clj-commons (1)
- # clj-http-lite (2)
- # clj-kondo (37)
- # cljdoc (1)
- # clojure (46)
- # clojure-europe (34)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (2)
- # clojurescript (54)
- # code-reviews (18)
- # cursive (2)
- # datalevin (32)
- # datomic (7)
- # etaoin (1)
- # fulcro (9)
- # gratitude (3)
- # hyperfiddle (15)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (32)
- # nrepl (1)
- # off-topic (18)
- # pathom (17)
- # pedestal (5)
- # polylith (89)
- # reitit (7)
- # releases (3)
- # remote-jobs (4)
- # shadow-cljs (52)
- # spacemacs (3)
- # squint (14)
- # tools-build (10)
- # tools-deps (18)
- # vim (4)
- # xtdb (34)
mawning
So now I discovered the cause of my woes… my university’s SAML identity provider covertly decodes the query string that is supposed to be passed back during the login process…. I wonder if a better idea is to encode in some other way… maybe base64?
you can't go wrong with an opaque alphanum token! you might have to get rid of b64 =
padding, since that get's url encoded - some b64 libs are ok to decode without it though
Hmm.. By = padding do you just mean any equals signs in the encoded value? Can I just search and replace those with some other character?
Looking at https://en.wikipedia.org/wiki/Base64#Base64_table_from_RFC_4648 I guess I will need to replace =, /, and +
doh! i'd forgotten b64 can output those chars. if you aren't too worried about token size, you could just hex encode the bytes of your UTF8 url string ... leaving you with just a [0..9]*
token
I went with this
(defn safe-base64
[s]
(str/replace s #"/|\+|=" {"/" "_", "+" "-", "=" "."}))
(defn unsafe-base64
[s]
(str/replace s #"_|-|\." {"_" "/", "-" "+", "." "="}))
(defn safe-encode
[url]
(safe-base64 #?(:clj (codec/base64-encode (.getBytes (codec/url-encode url)))
:cljs (js/btoa (js/encodeURIComponent url)))))
(defn safe-decode
[base64]
#?(:clj (-> base64 unsafe-base64 codec/base64-decode slurp codec/url-decode)
:cljs (-> base64 unsafe-base64 js/atob js/decodeURIComponent)))
I love how I got into coding to escape having to write history essays and now all the coding I do is to create evidence for (speculative) history essays and present them to people. I went wrong somewhere.
those who do study history are doomed to scream while watching the others repeat old mistakes.
I'll chip in with my https://github.com/ivarref/rewriting-history#rewriting-history library 🙃
theres some truth in that quote about > its never too late to have a happy childhood
So now I discovered the cause of my woes… my university’s SAML identity provider covertly decodes the query string that is supposed to be passed back during the login process…. I wonder if a better idea is to encode in some other way… maybe base64?
our understanding of history is very mutable as we are lacking the details of lots of the events though
And historians are biased. It’d probably be really interesting to see how specific events in history have been reported differently throughout the years in one country… Or to compare contemporary reports from different countries.
which is literally what history and historians do. Reading "for bias" and reading "through bias" in primary and secondary sources were the most important skills I learned in history. It does completely change how you look at the news, science and other things that say they are unbiased though.
My view is that everyone is biased 🙂 It’s not something one can escape, since you can’t express objective truth. But even without going down that philosophical road, my first thought whenever I hear something is most often “Cui bono?” Why would exalted scientists, news anchors, politicians, policemen… etc be exempt from allowing everyday human desires to influence their actions?
A bit bleak, yeah 😕
Trying to figure out what passes for unbiased, balanced, and objective is a fun bit of analysis for historians.
I don't find it bleak though. We are here now because of where we were before and what we all did, which opens up lots of possibilities
Of course. I’m should turn that frown upside down. I tend to think about the negative consequences of important figures acting on desire rather than the positive, which, evidently, are legion