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.
 
  • Locked thread
Luigi Thirty
Apr 30, 2006

Emergency confection port.

i'm working on it

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010


you have mentioned so many platforms i lost track, which are you doing this on?

Luigi Thirty
Apr 30, 2006

Emergency confection port.

HoboMan posted:

you have mentioned so many platforms i lost track, which are you doing this on?

Amiga

BangersInMyKnickers
Nov 3, 2004

I have a thing for courageous dongles

Is there some stupid trick to make outbound rewrite rules on IIS to work? I have a reverse proxy running to front an apache shitpile and that part works, but of course some jackass hardcoded a million FQDNs in to the page content instead of just using the relative path so I have to rewrite outbound content to fix it but even enabling a rule that does absolutely nothing (matches on .*, no action bound to it) makes the client see a 500 url rewrite module error and IIS is unhelpful as gently caress.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
oh kool, our web framework has chainable promises and also they unbanned linq with the discretionary rule "make sure it's readable and not insanely slower than the procedural version". little victories, i guess.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

i'm making edits to a wizard where if you edit the data model in any way in the method that checks to see whether a given page should be displayed, it's an infinite loop

can i post here

MSPain
Jul 14, 2006
sounds like a kick rear end fantasy novel

Carry On Then and the Wizard of Infinite Recursion

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I should probably do this junk in a system-friendly way instead of loving with hardware registers directly but for some reason Amiga devs are allergic to operating system APIs

Amiga Library Reference posted:

If you are drawing to the display area and do not want the user to see intermediate steps in the drawing, you can turn off the display. Because OFF_DISPLAY shuts down the display DMA and possibly speeds up other system operations, it can be used to provide additional memory cycles to the blitter or the 68000. The distribution of system DMA, however, allows four-channel sound, disk read/write, and a sixteen-color, low-resolution display (or four-color, high-resolution display) to operate at the same time with no slowdown (7.1 MHz effective rate) in the operation of the 68000. Using OFF_DISPLAY in a multitasking environment may, however, be an unfriendly thing to do to the other running processes. Use OFF_DISPLAY with discretion.

terrible programmers: Using OFF_DISPLAY in a multitasking environment may be an unfriendly thing to do to other running processes

Luigi Thirty fucked around with this message at 21:17 on Oct 31, 2016

gonadic io
Feb 16, 2011

>>=


i'm pretty unreasonably happy that i have successfully done a thing using VBO and instancing and vertex shaders and all that crap

it's a pretty big leap from just doing everything in a loop in immediate mode in opengl

here's the (rust) code:
https://github.com/djmcgill/Vox-Machina/blob/master/src/main.rs

i mean it's mostly just combining the examples to draw a cube and the example to instance squares but still this has taken weeks of not working on it to do

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


holy poo poo aspnet core makes unhandled exception error display almost useful and doesn't completely gently caress my existing MVC components when I parachute them in, this might actually work

except, why the gently caress can I not add internal DLLs as references directly and instead have to self publish them on Nuget or something, what the gently caress is up with that

gonadic io
Feb 16, 2011

>>=


that's the scale working! now to work out how to have a dynamic number of instances i.e. how to create another instance buffer when the first one fills

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

Flat Daddy posted:

i swear, they even added comments to explain one of the changes (relatively nice of them), so i know they werent editing + minifying it outside of source control and just copying it back in.

it really looks like the output of someone who has no loving idea about web dev at all, not even basic jquery*, and they had a strict requirement to add an angularJS frontend.

* somewhere they wrote: angular.element(document.querySelectorAll('.thing'));

literally everywhere i look in the source, theres an amazing coding horror ive never seen anywhere else

update - while looking over the login code I discovered there is no authentication really happening at all. the /login api pretty much just gives you a yes/no whether it worked but after that in subsequent calls you never send any private token, just your email addy. indiacode rulez

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
this is mongo with no migration or setup scripts , just live edited and we just found out there's no backups LOL.

VikingofRock
Aug 24, 2008




gonadic io posted:



i'm pretty unreasonably happy that i have successfully done a thing using VBO and instancing and vertex shaders and all that crap

it's a pretty big leap from just doing everything in a loop in immediate mode in opengl

here's the (rust) code:
https://github.com/djmcgill/Vox-Machina/blob/master/src/main.rs

i mean it's mostly just combining the examples to draw a cube and the example to instance squares but still this has taken weeks of not working on it to do

Hey, neat! How are you liking using Rust for this?

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
when you click submit for a forgot password request, it makes a getuser api call which returns the full mongo object for the user you are trying to reset, including password hash, to your browser. just so it can check that the user exists and let you know if the email was sent

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Flat Daddy posted:

when you click submit for a forgot password request, it makes a getuser api call which returns the full mongo object for the user you are trying to reset, including password hash, to your browser. just so it can check that the user exists and let you know if the email was sent

Flat Daddy posted:

indiacode rulez

it seems poo poo this bad only happens to me when working with china or india i think it's turning me racist

gonadic io
Feb 16, 2011

>>=

VikingofRock posted:

Hey, neat! How are you liking using Rust for this?

honestly at this point i'm not really programming in rust but in gfx, the graphics library. the rust required to use this library is very basic.

that seems pretty good though

there's a steep learning curve and a lot to take in at once - they eschew immediate mode entirely and force you to set up VBOs etc in order to do anything

on the other hand, you get quite a lot of static checking and safety which you really don't get in opengl. no idea what dx12 looks like though.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Flat Daddy posted:

this is mongo with no migration or setup scripts , just live edited and we just found out there's no backups LOL.

sneak into your next release a forced, automated backup task with only a very well-hidden opt-out option. bury it deep inside the patch notes.

i did exactly that a little over a year ago and it's paid off in spades.

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Luigi Thirty posted:

I should probably do this junk in a system-friendly way instead of loving with hardware registers directly but for some reason Amiga devs are allergic to operating system APIs

yeah its weird like that. you have to do a lot of things semi-manually compared to how they'd work on a modern OS, but i guess the tradeoff is that you can do exactly what you need and nothing more, instead of calling high-level API functions that probably do a ton of unnecessary housekeeping behind the scenes.

the os can do virtual screens (i think they were actually referred to as "screens" in the documentation), so the os-friendly thing to do would probably be to create a new screen and a bitmap for it, and then draw on the bitmap. then you can bring your screen to the front, or drag the os screen down by the menu bar to show the screen behind it or whatever

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sweevo posted:

yeah its weird like that. you have to do a lot of things semi-manually compared to how they'd work on a modern OS, but i guess the tradeoff is that you can do exactly what you need and nothing more, instead of calling high-level API functions that probably do a ton of unnecessary housekeeping behind the scenes.

the os can do virtual screens (i think they were actually referred to as "screens" in the documentation), so the os-friendly thing to do would probably be to create a new screen and a bitmap for it, and then draw on the bitmap. then you can bring your screen to the front, or drag the os screen down by the menu bar to show the screen behind it or whatever

yeah, i meant more of amiga dev people on the internet refusing to do anything without manipulating hardware directly. i've been digging through the intuition manual and that should be about right

one thing i like about this os is that you can mount any folder (or multiple folders at once) as a logical device so my winuae transfer folder is just PC:, my compiler lives at VBCC:, and my source code is all in ASM: :)

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Flat Daddy posted:

when you click submit for a forgot password request, it makes a getuser api call which returns the full mongo object for the user you are trying to reset, including password hash, to your browser. just so it can check that the user exists and let you know if the email was sent

lol this is like one of our IndiaApps that makes an auth request to some endpoint that returns your username as is so you can just change it to whatever you like. also it returns a bool of 'isadmin' and if you set it to true you can then see all records and impersonate other users

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





it's bad all over. we acquihired a competitor based in los angeles and they were using google docs as source control for all the terrible python scripts they built their business on

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

How can i learn me some xml parsing in Java. There are a bunch of parsers in the standard library, but the documentation I've pulled up in the first couple of search result pages is all really old and not very helpful. My use case is to parse results from this public web API. Don't say "use the JSON calls" because get bent I'm doing XML to learn. The specific thing I'm going to be doing is making this particular API call (warning LOLHUEG):

https://www.predictit.org/api/marketdata/all/

and then extracting the info I want, while chucking the stuff I don't care about. So I don't need to have the whole document tree in-memory, or the ability to go back and forth in the tree; I'll just be running through it and extracting a few bits from each entry to convert to (probably) SQL rows. It's just I'm kind of stuck with whether I should be using one of the builtin Java libraries (SAX, StAX, whatever) or if there is some cool third-party thing I should use, or what.

Sapozhnik
Jan 2, 2005

Nap Ghost
No really, why the gently caress are you voluntarily using XML for anything that doesn't involve actual honest-to-god markup, which is the one thing that XML is at least somewhat good for and that nobody actually uses it for.

You want an actual answer though. Don't use the built-in XML APIs. They're alright but they're the pinnacle of Java's "vendor neutral" enterprise wankfest from the early 2000s.

Use XOM instead.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Powerful Two-Hander posted:

holy poo poo aspnet core makes unhandled exception error display almost useful and doesn't completely gently caress my existing MVC components when I parachute them in, this might actually work

except, why the gently caress can I not add internal DLLs as references directly and instead have to self publish them on Nuget or something, what the gently caress is up with that

iirc you can wrap non-core dlls in such a way that doesn't require the nuget thing but it's been a while since I did it and it's probably changed. I think you need a package.json file or something for them?

Sapozhnik
Jan 2, 2005

Nap Ghost
Back in the day a bunch of gigantic enterprise shitware vendors who all hated each other would get together and design a massive sprawling specification for things like web application runtimes, persistence frameworks, and distributed transaction co-ordinators. I'm not sure they even tried to build implementations of these interfaces or anything, they just shat out a phonebook-sized specification full of Java interfaces and worried about the actual implementations later.

So the idea was, there was a standard interface for all these things and you'd buy an implementation of all of this "Java EE" poo poo from a vendor. And if you didn't like that vendor, then you could just go to a different vendor. Because that's how these things work in the real world, obviously. Not just Java EE, but XML was all the rage back then so they even did the same sort of thing for XML: The W3C defined the DOM API, then some other fucks defined the SAX API, and then somebody else defined something in between called StAX. So you could pick and choose what vendor supplied your XML parser. Given time I'm sure we'd have had vendor neutral hash tables and dynamic arrays specifications too.

Anyway this was all kind of poo poo so instead things like Spring and Hibernate arose. Believe it or not, those were downright lightweight compared to Java EE. And instead of having a gigantic specification implemented by multiple proprietary software vendors you just had a single open-source code base. Those slimmer designs eventually kinda got standardized interfaces in the form of the javax.inject and javax.persist (aka JPA) APIs.

Progressive JPEG
Feb 19, 2003

to be clear, phonebook-sized specifications are made that way because the authors are placing themselves as the only ones who can implement them

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

Sapozhnik posted:

No really, why the gently caress are you voluntarily using XML for anything that doesn't involve actual honest-to-god markup, which is the one thing that XML is at least somewhat good for and that nobody actually uses it for.

You want an actual answer though. Don't use the built-in XML APIs. They're alright but they're the pinnacle of Java's "vendor neutral" enterprise wankfest from the early 2000s.

Use XOM instead.

Java's built in XML is fine just use it. except not for non markup because markup is the point of XML. it's in the name.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
eXtensible json replaceMent Language

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Progressive JPEG posted:

to be clear, phonebook-sized specifications are made that way because the authors are placing themselves as the only ones who can implement them

I think in the Java Enterprise era there was actually quite a bit of cargo culting of that, where people shat out huge specs because that's what you do to be Enterprise

mimicking the form without knowing why

ComradeCosmobot
Dec 4, 2004

USPOL July

ulmont posted:

Java's built in XML is fine just use it. except not for non markup because markup is the point of XML. it's in the name.

i just ended up settling on xml for some hand-edited resources the other day because xml schema makes it a lot easier to validate them and prevent awful non-coders from doing stupid things which they will try regardless of what format i chose :shrug:

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
the last few times i've had to do something with xml, i've just generated a class structure from the xsd with jaxb :shrug:

go play outside Skyler
Nov 7, 2005


Progressive JPEG posted:

to be clear, phonebook-sized specifications are made that way because the authors are placing themselves as the only ones who can implement them

my friend have you heard of OPCUA?
https://opcfoundation.org/about/opc-technologies/opc-ua/

it's a shitpile of garbage poo poo for idiots

no really the protocol is made so complicated only a select few vendors can actually implement it

also did I mention it doesn't actually work that well but every manager in the industrial software biz absolutely wants OPCUA?

Elias_Maluco
Aug 23, 2007
I need to sleep

Powerful Two-Hander posted:

lol this is like one of our IndiaApps that makes an auth request to some endpoint that returns your username as is so you can just change it to whatever you like. also it returns a bool of 'isadmin' and if you set it to true you can then see all records and impersonate other users

Unfortunately I couldnt find the screenshot, but once a client needed to change the admin password for the CMS of this old site he had, cause it was something like 123456, and his server was invaded recently.

So I downloaded the whole thing, site and database, to find where and how the password was stored and change it. The database didnt had any "user" table or anything like, so I figured it was hard coded so I went looking for it on the PHP code, but I could not find anythin. Nor anything related to authentication. Actually, I found that there was no auth checking outside of the login screen, so you could just bypass it by typing the CMS URLs directly. So I knew it was useless to just change the password, that thing would still be open

But still I wanted to know where was that drat hardcodded password. I finally found it. On a javascript file that was loaded in every page. The login code was something like this

code:
if($('#login').val() == 'admin' && $('#password').val() == '123456')
{
	window.location = '/admin/index.php';
}
else
{
	alert('Could not login')
}

Elias_Maluco fucked around with this message at 12:18 on Nov 1, 2016

Shaggar
Apr 26, 2006

Wheany posted:

the last few times i've had to do something with xml, i've just generated a class structure from the xsd with jaxb :shrug:

thats always worked for me plus you can run a maven codegen plugin to automate the xsd->java

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Elias_Maluco posted:

Unfortunately I couldnt find the screenshot, but once a client needed to change the admin password for the CMS of this old site he had, cause it was something like 123456, and his server was invaded recently.

So I downloaded the whole thing, site and database, to find where and how the password was stored and change it. The database didnt had any "user" table or anything like, so I figured it was hard coded so I went looking for it on the PHP code, but I could not find anythin. Nor anything related to authentication. Actually, I found that there was no auth checking outside of the login screen, so you could just bypass it by typing the CMS URLs directly. So I knew it was useless to just change the password, that thing would still be open

But still I wanted to know where was that drat hardcodded password. I finally found it. On a javascript file that was loaded in every page. The login code was something like this

code:
if($('#login').val() == 'admin' && $('#password').val() == '123456')
{
	window.location = '/admin/index.php';
}
else
{
	alert('Could not login')
}

yeeessshhh lmfao

Shaggar
Apr 26, 2006

Elias_Maluco posted:

Unfortunately I couldnt find the screenshot, but once a client needed to change the admin password for the CMS of this old site he had, cause it was something like 123456, and his server was invaded recently.

So I downloaded the whole thing, site and database, to find where and how the password was stored and change it. The database didnt had any "user" table or anything like, so I figured it was hard coded so I went looking for it on the PHP code, but I could not find anythin. Nor anything related to authentication. Actually, I found that there was no auth checking outside of the login screen, so you could just bypass it by typing the CMS URLs directly. So I knew it was useless to just change the password, that thing would still be open

But still I wanted to know where was that drat hardcodded password. I finally found it. On a javascript file that was loaded in every page. The login code was something like this

code:
if($('#login').val() == 'admin' && $('#password').val() == '123456')
{
	window.location = '/admin/index.php';
}
else
{
	alert('Could not login')
}

excellent

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Elias_Maluco posted:

Unfortunately I couldnt find the screenshot, but once a client needed to change the admin password for the CMS of this old site he had, cause it was something like 123456, and his server was invaded recently.

So I downloaded the whole thing, site and database, to find where and how the password was stored and change it. The database didnt had any "user" table or anything like, so I figured it was hard coded so I went looking for it on the PHP code, but I could not find anythin. Nor anything related to authentication. Actually, I found that there was no auth checking outside of the login screen, so you could just bypass it by typing the CMS URLs directly. So I knew it was useless to just change the password, that thing would still be open

But still I wanted to know where was that drat hardcodded password. I finally found it. On a javascript file that was loaded in every page. The login code was something like this

code:
if($('#login').val() == 'admin' && $('#password').val() == '123456')
{
	window.location = '/admin/index.php';
}
else
{
	alert('Could not login')
}

lol. it always amazes me that ppl do poo poo like this because if you're being supremely lazy i would think you'd google "authentication" and just steal the easiest-to-do thing, which is almost cerrtainly a web framework that does it way better.

HoboMan
Nov 4, 2010

yeah my api just uses copy-pasted oauth boilerplate

i don't actually know how it works lol

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
oauth2 is moderately cool

  • Locked thread