• 0 Posts
  • 32 Comments
Joined 1 年前
cake
Cake day: 2023年7月15日

help-circle



  • That’s correct, it is just plain text and it can easily be spoofed. You should never perform an auth check of any kind with the user agent.

    In the above examples, it wouldn’t really matter if someone spoofed the header as there generally isn’t a benefit to the malicious agent.

    Where some sites get into trouble though is if they have an implicit auth check using user agents. An example could be a paywalled recipe site. They want the recipe to be indexed by Google. If I spoof my user agent to be Googlebot, I’ll get to view the recipe content they want indexed, bypassing the paywall.

    But, an example of a more reasonable use for checking user agent strings for bots might be regional redirects. If a new user comes to my site, maybe I want to redirect to a localized version at a different URL based on their country. However, I probably don’t want to do that if the agent is a bot, since the bot might be indexing a given URL from anywhere. If someone spoofed their user agent and they aren’t redirected, no big deal.


  • User agents are useful for checking if the request was made by a (legitimate self-identifying) bot, such as Googlebot.

    It could also be used in some specific scenarios where you control the client and want to easily identify your client traffic in request logs.

    Or maybe you offer a download on your site and you want to reorder your list to highlight the most likely correct binary for the platform in the user agent.

    There are plenty of reasonable uses for user agent that have nothing to do with feature detection.



  • JSON Problem Details

    https://datatracker.ietf.org/doc/html/rfc9457

    • It has a specification, so a consumer of the API can immediately know what to expect.
    • It has a content type, so a client sdk can intelligently handle the response.
    • It supports commonly needed members which are a superset of all of the above JSON examples, including type for code and repeating the http status code in the body if desired.
    • It is extensible if needed.
    • It has been defined since at least 2016.

    This specification’s aim is to define common error formats for applications that need one so that they aren’t required to define their own …

    So why aren’t you using problem details?




  • Duh. Trump is open to anything that will get him more money from idiots or re-elected so he can avoid consequences for his multitude of crimes. Ideally both.

    If the twitter twit said he’d give Donald $50M to support a ban on cantaloupe, the next press conference with him would be someone should really look into this and the Fox news headline the next day would be about dangerous illegal immigrants smuggling fentanyl inside cantaloupe.




  • elrik@lemmy.worldtoScience Memes@mander.xyzSuffering
    link
    fedilink
    English
    arrow-up
    35
    ·
    3 个月前

    It really depends on the specifics of the top track. Are people added to the top track just in time to be run over by the trolley, or is the track pre-populated with an endless arrangement of people waiting to be run over.

    If it’s the later case, how do people further down the track survive for an unbounded amount of time while waiting to be run over? Do they wait, bound and screaming for an eternity? How do they survive long enough to be alive before being run over?

    I need to know if the top track reduces to running over an infinite arrangement of corpses. Or, if trolley time for the top track has some different meaning, such that the trolley brings an end to the finite life lived by each next person on the track.


  • elrik@lemmy.worldtoScience Memes@mander.xyzBreast Cancer
    link
    fedilink
    English
    arrow-up
    7
    ·
    3 个月前

    Ductal carcinoma in situ (DCIS) is a type of preinvasive tumor that sometimes progresses to a highly deadly form of breast cancer. It accounts for about 25 percent of all breast cancer diagnoses.

    Because it is difficult for clinicians to determine the type and stage of DCIS, patients with DCIS are often overtreated. To address this, an interdisciplinary team of researchers from MIT and ETH Zurich developed an AI model that can identify the different stages of DCIS from a cheap and easy-to-obtain breast tissue image. Their model shows that both the state and arrangement of cells in a tissue sample are important for determining the stage of DCIS.

    https://news.mit.edu/2024/ai-model-identifies-certain-breast-tumor-stages-0722


  • elrik@lemmy.worldtoMemes@lemmy.mlWho needs Skynet
    link
    fedilink
    English
    arrow-up
    18
    ·
    4 个月前

    The relative number here might be more useful as long as it’s understood that Google already has significant emissions. It’s also sufficient to convey that they’re headed in the wrong direction relative to their goal of net zero. A number like 14.3 million tCO₂e isn’t as clear IMO.






  • I use an app called Recipe Keeper. It’s amazing because I just share the page to the app, it extracts the recipe without any nonsense, and now I have a copy for later if I want to reuse it. I literally never bother scrolling recipe pages because of how terrible they all are, and I decide in the app if the recipe is one I want to keep.

    It also bypasses paywalls and registration requirements for many sites because the recipe data is still on the page for crawlers even if it’s not rendered for a normal visitor.