/edit I added some more context in a child comment
1,199 karma · joined September 10, 2015
/edit I added some more context in a child comment
Why does any of those programs contain the password anyway if it is not needed for achieving the goal?
If it is not needed, flow analysis, tree shaking and const evaluation could get rid of it.
If it is needed, how would the program not containing it achieve the goal?
Now if you have more than two states you want to encode you need at least one additional bit. Eg two bits allow for four different states (00,01,10,11). But that way (adding a bit, or highler level a field in a struct/tuple) your numbr of possible states grow exponentially.
What if you have exactly 3 states you want to represent (eg small/medium/largem, up/down/mute or x/y/z) or 6 (not a power of two) states? The way you encode the states by combining bits you allow for more states to be encoded than are actually valid. So you allow invalid states. Eg for ["00"~small, "01"~medium, "10"~large] you can not decode "11".
The way combining bits works can be though of as product data types. The number of possible combinations get multiplied when composing data types.
Now sum types enable you to define number of states which are not-power-of-two by summing the possible combinations when composing.
Algebraic data types combine product and sum types so you can define set of encodable states as the exact number of actual valid sates you want your system to have.
Next I create a youtube account but as E-Mail address I enter laszlo@inopinatus.com and I am told to click the link in the confirmation E-Mail... that I never receive. Well I do not like youtube anyway so I head over to hackernews and create an account to write this comment. Oh no I can not because I typed my E-Mail address in lowercase again. So now I am wondering if there is some error so I open your homepage, search for the support page and file a bug report, typing my E-Mail address in lowercase into the E-Mail field. I never receive your response telling me to write my E-Mail address in the correct casing. I come to the conclusion that my E-Mail account just does not work and create another one at a provider that is case insensitive. OR I figure out/am told that the case is important and will never forget it again.
So where exactly are services like youtube or hn that ask me for my E-Mail responsible for handling upper/lower case correctly? The solution could still be: store both the hash for the canonicalized address and the hash of the exact address of which you know that it worked at some point in time. If the user enters the address later the matches the one but not the other issue a warning that should they not receive the E-Mail to double check their spelling.
1. on mac os you can press cmd+backtick to cycle through the windows of the current app
2. except for some exceptions keyboard shortcuts are pretty unified across all apps on mac os and can even be configured in a single global place
3. from my biased point of view of being a software developer myself: If I see a file chooser modal component that locks all interaction then I see a wrong choice in a UI component that does not fit the usecase. But if I see a rendering glitch of a component in a promotional video, it looks to me as if the whole state space of the component or even of the GUI stack is ill defined. Visual states like this [1] should not appear. If they are inside a promotional video I assume that some people have seen it happening and either did not care or it is very hard to fix because the issue is rooted deeply in the system. Maybe I overreact but I stumble across glitches like this all the time I try to use linux on the desktop.
I just do not get way the website itself has a say in how to display the constent prompt at all (it needs to be accessible, should be readble and dismissable without javascript, actually I would want to be able to read it before visiting the website). Currently I can not even get a list of all websites of which I accepted any agreement with not to mention re-reading any of those consent texts.
- you can write/encode/embed additional data into an image, fine
- twitter (and everyone else) hosts such images for you, fine
- twitter sends CSP header that allows scripts from other origins to access the full image data (ie the embeded data), fine, should not be a problem, anybody has access to that data as it was spcifically placed there, anyone could download/mirror it anyway
Now when demontrating the possible attack the author assumes a valnuable script on another domain that permits code injection. They inject javascript code that decodes the data from the image that is fetched from twitter and evals that extracted code. But if you an already inject javascript code anyway, why would you need to decode the twitter image? You already have access to the origin of the attacked page, loading the image from twitter gains you nothing (eg it does not give you access to the twitter origin, eg does not allow you to read twitter cookies, right?).
Given a site is valnuable to code injection you could as well either just inject all your evil js code instead hosting it on twitter inside an image or in case of length limits on the injectable code just host the majority of the evil code on your own server, configure it for CORS and then inject the script-tag on your victims site.
Am I missing something? I do not see how COS is bypassed in any way.
you get full ssh access and can do almost whatever you like.
- pushState is only used for overriding the default behavior, mostly to keep the url bar in sync with changing client state
- pushState pollutes the browsers history
- users have a mental model of how many steps/clicks they performed on a site and expect that an equal number of clicks on the back button brings them back to the beginning
- users are upset if that expectation is not matched
The site should not have control over the users history in the first place but for SPA it's necessary to achieve the expected behavior. But the browser should make sure that it's not misused. In the same way that pop-ups are blocked outside of whitelisted event listeners to prevent a website from polluting your screen, pushState should be blocked to prevent history pollution.