Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Macichne Leainig
Jul 26, 2012

by VG

The Fool posted:

you'll just get all the extra taxes they couldn't figure out for other people

Accompanying article about the guy with the "null" license plate who got a bunch of tickets because if an officer entered no or a blank license plate # on a ticket, it would auto-resolve to his:

https://www.theverge.com/tldr/2019/8/14/20805543/null-license-plate-california-parking-tickets-violations-void-programming-bug

Adbot
ADBOT LOVES YOU

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

The Fool posted:

you'll just get all the extra taxes they couldn't figure out for other people

this

e: oh look, a new page :doh:

Zopotantor fucked around with this message at 06:41 on Nov 10, 2020

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Ralith posted:

It's unclear if there was actually a vulnerability triggered, or if they were just being cautious.

quote:

A Companies House spokesperson said: “A company was registered using characters that could have presented a security risk to a small number of our customers, if published on unprotected external websites. We have taken immediate steps to mitigate this risk and have put measures in place to prevent a similar occurrence. We are confident that Companies House services remain secure.”

yeah, according to the spokesman they're just being careful. of course, it might be that they actually were vulnerable and they are just saving face.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
My guess would be "someone important that uses our data was vulnerable and complained, we don't want to mention who they are".

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
the Outlook Web App screen for composing an email

the "To" address field seemingly isn't marked up as a field that accepts email addresses, so if you're using it from a mobile phone and you want to enter an email address you've not used before... well good loving luck basically. try to enter "alphabravo@charliedelta.com" or whatever, and it'll interpret the dot in ".com" as the end of a sentence and gently caress up the email address you carefully entered. And then you can't manually edit to stitch it back together, because it tries to be all cute and replaces the text of a completely entered address with a little coloured box with rounded corners, in place of the original editable text. Hope you know which menu the option to kill autocorrect is buried in.

Soricidus
Oct 21, 2010
freedom-hating statist shill
Why are you using owa to compose emails? Its only purpose is to provide access to the features that mysteriously haven’t been exposed in the o365 client.

CPColin
Sep 9, 2003

Big ol' smile.
I only use OwO to compose my emails and they all start with, "puw my wast emaiw..."

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Soricidus posted:

Why are you using owa to compose emails? Its only purpose is to provide access to the features that mysteriously haven’t been exposed in the o365 client.

I wanted to email someone a photo I'd taken on my phone's camera.

Bongo Bill
Jan 17, 2012

I asked my magic 8-ball and it said "Outlook not so good"

Macichne Leainig
Jul 26, 2012

by VG


Now that's what I call a memory leak. :eyepop:

Volmarias
Dec 31, 2002
Probation
Can't post for 38 minutes!

Protocol7 posted:



Now that's what I call a memory leak. :eyepop:

laughs in chrome

Carbon dioxide
Oct 9, 2012

https://twitter.com/thingskatedid/status/1328918322507706368

Xarn
Jun 26, 2015
Agreed, VLAIS are a horror.

more falafel please
Feb 26, 2005

forums poster

Hey, it's constant time at least.

Carbon dioxide
Oct 9, 2012

https://twitter.com/harlanhaskins/status/1328750010620469248

I like how the compiler dgaf

xtal
Jan 9, 2011

by Fluffdaddy
Reminder that a[b] in C is just a*b

Soricidus
Oct 21, 2010
freedom-hating statist shill

xtal posted:

Reminder that a[b] in C is just a*b

I think you mean *(a + b)

OddObserver
Apr 3, 2009

What uses a register calling convention on x86 anyway? Or is it x86-64 using 32-bit registers (don't know what the ABI is for it..)

Qwertycoatl
Dec 31, 2008

OddObserver posted:

What uses a register calling convention on x86 anyway? Or is it x86-64 using 32-bit registers (don't know what the ABI is for it..)

It's this: https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI

feedmegin
Jul 30, 2008

OddObserver posted:

What uses a register calling convention on x86 anyway? Or is it x86-64 using 32-bit registers (don't know what the ABI is for it..)

Even Microsoft had __fastcall

more falafel please
Feb 26, 2005

forums poster

feedmegin posted:

Even Microsoft had __fastcall

fastcall, stdcall, and thiscall all resolve to the MS convention, which does use registers.

feedmegin
Jul 30, 2008

more falafel please posted:

fastcall, stdcall, and thiscall all resolve to the MS convention, which does use registers.

I meant on 32 bit x86.

Foxfire_
Nov 8, 2010

OddObserver posted:

What uses a register calling convention on x86 anyway? Or is it x86-64 using 32-bit registers (don't know what the ABI is for it..)
Anything where the compiler can see the code being called and the call site and decides it's a good idea. No rule that all calls to the same function have to go to the same implementation.

Soricidus
Oct 21, 2010
freedom-hating statist shill

feedmegin posted:

I meant on 32 bit x86.

On 32-bit x86 fastcall used registers. That’s why it was fast.

Thiscall too if you count putting the this reference in ecx.

Loezi
Dec 18, 2012

Never buy the cheap stuff
https://twitter.com/gottapatchemall/status/1334628520165658631

Nth Doctor
Sep 7, 2010

Darkrai used Dream Eater!
It's super effective!


I'm doing the Advent of Code this year, and using it as an excuse to cultivate some good habits and build up some experience with stuff I tend not to use very often.

One of the things I'm trying to do is to learn and use LINQ when I can justify it.

Spoilers for solutions to part 2 of yesterday's puzzles

Yesterday's challenge involved figuring out your seat on a sold out flight, when you've forgotten your boarding pass but managed to scan everyone else's passes.

Coming from a deep SQL background, I immediately thought of how I would use LEFT OUTER JOINs to do this and implemented this nonsense in LINQ:


// Looking for an unclaimed seat with neighbors
// Means we're looking for a pair of seats where one does not exist between them.
var missingId = boardingPasses
// self join to boarding passes where the seatID is one higher
.GroupJoin(
boardingPasses,
p1 => p1.SeatId,
p2 => p2.SeatId - 1,
(lowerPass, upperPassEnumerable) => new { lowerPass, upperPassEnumerable }
)

// flatten the upperPass IEnumerable, and default to null if the enumerable is empty
// map into a lower pass and an upper pass
.SelectMany(
pair => pair.upperPassEnumerable.DefaultIfEmpty(),
(lowerPair, upperPass) => new { lowerPair.lowerPass, upperPass }
)

// Preemptively filter out anything where we have a matching pair. We only want ones where the upperPass is not found
.Where(pair => pair.upperPass is null)

// Join again to boarding passes, on passes whose seat IDs are 2 higher than our pair's lower seatId
.GroupJoin(
boardingPasses,
p1 => p1.lowerPass.SeatId,
p2 => p2.SeatId - 2,
(lowerPair, upperPassEnumerable) => new { lowerPair.lowerPass, middlePass = lowerPair.upperPass, upperPassEnumerable }
)

// Once again flatten the upperPassEnumerable and default to null if it is empty
// Map into a trio of passes
.SelectMany(
passTrio => passTrio.upperPassEnumerable.DefaultIfEmpty(),
(triple, upperPass) => new { triple.lowerPass, triple.middlePass, upperPass }
)

// Filter to only cases where we have a non-null set of outer passes, and a null middle pass.
.Where(passTrio => (passTrio.lowerPass != null && passTrio.middlePass is null && passTrio.upperPass != null))

// Derive the missing ID from the upper and lower SeatIds
.Select(p => new { missingId = (p.upperPass.SeatId + p.lowerPass.SeatId) / 2 } )

// Give the first entry in the final set
.FirstOrDefault();

Console.WriteLine(missingId);


I shamefacedly shared this solution to my colleague who told me about Enumerable.Range() and Enumerable.Except():


var seatIds = boardingPasses.Select(pass => pass.SeatId);
var idRange = Enumerable.Range(seatIds.Min(), seatIds.Max());

var missingId = idRange.Except(seatIds).First();
Console.WriteLine(missingId);



It's me, I'm the horror.


A friend of mine enjoyed how, earlier this week when I wrote a searching algorithm for a puzzle, my parameters were named needle and haystack.

Nth Doctor fucked around with this message at 00:53 on Dec 10, 2020

Loezi
Dec 18, 2012

Never buy the cheap stuff

Nth Doctor posted:

A friend of mine enjoyed how, earlier this week when I wrote a searching algorithm for a puzzle, my parameters were named needle and haystack.

Nice, I use the :same: for any abstract "find thing in a collection" tasks

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I got needle and haystack drilled into my head from the PHP manual, because it's seemingly random which one comes first in a parameter list.

xtal
Jan 9, 2011

by Fluffdaddy
Not to detract from the fun of it, those are widely used, see https://www.php.net/in_array

FlapYoJacks
Feb 12, 2009
Using PHP is the real horror.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Nth Doctor posted:

A friend of mine enjoyed how, earlier this week when I wrote a searching algorithm for a puzzle, my parameters were named needle and haystack.

yes, I do the same. But that particular naming convention is fine in any codebase IMO, it's not being overly clever. If you speak English to a decent standard then you know the idiom "to look for a needle in a haystack", so seeing those parameter names you know exactly what the parameters are for. It's a lot more understandable and succinct than any other way of expressing "thing that is looked for inside another thing"

Nth Doctor
Sep 7, 2010

Darkrai used Dream Eater!
It's super effective!


Hammerite posted:

yes, I do the same. But that particular naming convention is fine in any codebase IMO, it's not being overly clever. If you speak English to a decent standard then you know the idiom "to look for a needle in a haystack", so seeing those parameter names you know exactly what the parameters are for. It's a lot more understandable and succinct than any other way of expressing "thing that is looked for inside another thing"

Oh I definitely wasn't trying to say that was the horror. Just an aside to my overarching I'm terrible at LINQ post. :)

Blue Footed Booby
Oct 4, 2006

got those happy feet

Nth Doctor posted:

Oh I definitely wasn't trying to say that was the horror. Just an aside to my overarching I'm terrible at LINQ post. :)

LINQ is great, but every so often I finish writing something and realize I've written something absolutely abominable.

NtotheTC
Dec 31, 2007


https://twitter.com/LloydLabs/status/1336866373331546112

xtal
Jan 9, 2011

by Fluffdaddy
I've never played Cyberpunk 2077 but I'm getting so much entertainment from it

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Back in my day the launcher was the game!

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

Unless unprivileged accounts can write to that JSON I don't see how this is supposed to get me any access I didn't have before

Volte
Oct 4, 2004

woosh woosh
I don't think Cyberpunk even has privileged access, it says it's signed so I guess it can run in the context of CDPR's app certificate or something. The tweet isn't exactly clear about the implications or why this is any different from e.g. being able to add calc.exe as a custom game in Steam and then launch it from there.

QuarkJets
Sep 8, 2008

Volte posted:

I don't think Cyberpunk even has privileged access, it says it's signed so I guess it can run in the context of CDPR's app certificate or something. The tweet isn't exactly clear about the implications or why this is any different from e.g. being able to add calc.exe as a custom game in Steam and then launch it from there.

This probably isn't a threat to most business networks, but is a threat to tons of individuals. For instance, launch a persistent keylogger prior to launching the game. Or launch something that requests privilege escalation because most users just want to play their game and will click "OK" immediately.

This isn't overriding the location pointed to by Steam, it's taking advantage of the fact that anyone can edit the JSON that the Cyberpunk launcher reads from when the user presses a button.

(and this isn't unique to Cyberpunk; many game launchers have this kind of vulnerability)

Adbot
ADBOT LOVES YOU

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Someone who has access to edit that file probably has more direct options to do whatever they're trying to do.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply