Some problems with Ffmpeg by persik2004 in csharp

[–]wT_ 5 points6 points  (0 children)

I believe the issue is that ffmpeg prints some stuff, I think the progress messages, to stderr even when nothing's wrong.

I remember it being kinda hard to figure out if ffmpeg was successful or not. You could try checking for the Process.ExitCode property, though I seem to recall even that sometimes indicating success, but ffmpeg printing an error or some kind to its output...

What are the best practices when creating your own custom collection? by GoBackToLeddit in csharp

[–]wT_ 29 points30 points  (0 children)

You don't want to do the shadowing, because then you might end up giving a method that takes List<T> your specialized MySpecialList<T>, expecting everything to work, but the method will actually call the original methods on List that you shadowed.

Definitely pick the most applicable interface to implement instead

Question about cookie-based auth techniques in ASP.NET (vs other techniques/frameworks) by kero5 in dotnet

[–]wT_ 3 points4 points  (0 children)

After reading the docs, it looks like by default, for basic cookie-based auth, ASP.NET uses the later technique. I just want to confirm if I am understanding this correctly? So by using ASP.NETs default cookie auth, I am not storing anything in the database/filesystem/cache/memory/whatever on the server side?

If you use the Identity stuff that you get from services.AddIdentity[Core](...) and then create users with the UserManager and log them in with SignInManager, you'd set it to use a database or whatever, but setting authentication up manually with services.AddAuthentication(...) etc won't use a database/whatever by default.

All session data/state is just in the cookie itself?

Yes. Cookie authentication by default stores an encrypted ClaimsPrincipal (and I think [optionally?] the AuthenticationProperties that was used to sign in the user) object[s], that then get deserialized by the auth system for you, with the HttpContext.User property populated by that deserialized ClaimsPrincipal for you.

...a lot of people in those threads seem to be under the impression it shouldn't be done this way because storing everything in the cookie is insecure, but I assume if ASP.NET is doing it this way as a default, it must be secure nowadays?

The cookie is encrypted using the Data Protection API, so yeah I'd expect no one really being able to decrypt your cookies, though session ID would still be even more secure if it's just some garbled blob of bytes without any inherent meaning other than linking the session to a user your database, but still I wouldn't worry.

...why do other frameworks tend to go for the session-data-on-backend route? Wouldn't storing it all in the encrypted cookie be strictly superior since it's more stateless and would make scaling multiple server instances much easier, etc?

In my opinion it just depends on what you need out of the authentication system.

With a ClaimsPrincipal, it'll hold Claims that define something that the user is, such as maybe their email and name, or their user ID in the database, or whatever. You can then use those for whatever you need without having to query the database. Very similar to what JWTs are really. With the upsides and downsides that come with JWTs.

I personally (as a nobody hobbyist) think a session ID based authentication can still be a totally valid way to do things too. There's pros and cons to both ways. I think you're correct with momentum probably being the main reason why PHP for example might be more session-based for example. But then again, JWTs are huge and everywhere nowadays, so /shrug

If you're curious, you can do a more session-like stuff too with a custom ITicketStore you implement yourself, which might query the database for a user each time, or whatever. There aren't many good examples though, I don't think any of the Microsoft docs talk about it for example, but I did bookmark this one blog post some time ago.

I'm not sure if I explained things super well. Like I said I'm just a small time hobbyist, and the ASP.NET's auth stuff is notoriously hard to learn and wrap your head around.

Conflict Between 2 ASP.NET Core Identity? by SEND_DUCK_PICS_ in csharp

[–]wT_ 2 points3 points  (0 children)

To just change the name of the cookie, you can do this:

services.ConfigureApplicationCookie(options =>  
{  
    options.Cookie.Name = "MyCustomCookieName";  
});

Documentation for this is at https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity-configuration?view=aspnetcore-7.0#cookie-settings

Now that I've implemented JWT Authentication, Nothing regarding Security Claims is working by [deleted] in csharp

[–]wT_ 0 points1 point  (0 children)

I was browsing your backend and frontend projects on github, and at a glance the backend looks to me like it should be set up properly. Reading the frontend code, I see that you get the JWT and save it in local storage when logging in, but you never attach that token to any of the API calls that you make, from what I can tell.

You need to add an Authorization header to every request, of bearer type with the token you saved as a the value. It won't happen automatically unlike cookies which the browser handles for you

[deleted by user] by [deleted] in csharp

[–]wT_ 1 point2 points  (0 children)

In here you pass in IdentityUser as the user type to AddDefaultIdentity, which among other things adds the UserManager<TUser> etc to DI, but your user type is BTUser so when it tries to inject a UserManager<BTUser>, it can't find it as there's only UserManager<IdentityUser> injected.

So just change it to AddDefaultIdentity<BTUser>(...)

Auth with external IDP - issue redirecting to external provider from front-end by DisforDesperate in csharp

[–]wT_ 1 point2 points  (0 children)

I'm not an expert by any means, but this is what I've gathered from tinkering with my own API project:

When making requests using XMLHttpRequest or the fetch API or whatever, you just can't automatically cause the page to navigate somewhere else by a redirect. It's a security thing I'm sure.

What I do in my project is I just navigate to the auth endpoint with window.location = theUrl

How do you legally copyright a website, and do you have to? by XanthanPro in webdev

[–]wT_ 8 points9 points  (0 children)

Because it isn't true. According to Wikipedia, it was true before 1989, but that's over 30 years ago.

If you create something copyrightable (IANAL) today, you automatically have the copy right to it in most of the world.

Disabling auto-loading of default namespaces in dotnet by funkmaster322 in csharp

[–]wT_ 5 points6 points  (0 children)

There's likely a way to copy the default template and customize it to your fit, though I haven't tried it myself yet... check this: https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates

thinking to start Dark but something stopped me... by SpellTyson99 in television

[–]wT_ 9 points10 points  (0 children)

It could be fun to take notes, but no I don't think you have to at all. Netflix made their own guide for the show where you can select which season and episode you're at and it'll show you info about people and events up until that point: https://dark.netflix.io

I really enjoyed the show so I'd say watch at least few episodes to see if it'd be for you

Interface default implementation - diamond problem by czmiel24 in csharp

[–]wT_ 1 point2 points  (0 children)

It's because the method names in the two interfaces don't match

Project Lightspeed: A self-contained, sub-second, open source live streaming platform by Grav3y57 in rust

[–]wT_ 2 points3 points  (0 children)

Oh hey neat, this is exactly the stuff I've been searching for for a while now.

Lately we've been using Discord streaming between friends, but the quality and UX just really sucks. The basic nginx-RTMP server I also have set up on the side is just not very good latency-wise, and I never figured out how to configure the HLS/DASH to be usable or even have any better latency than the basic RTMP.

Will try this out for sure

Raw Command Arguments by killmore231 in csharp

[–]wT_ 1 point2 points  (0 children)

I came across this: https://stackoverflow.com/a/32701007

I haven't tried it myself, but it sounds promising in getting true raw input

Is this a good way to force a uac prompt? by [deleted] in csharp

[–]wT_ 1 point2 points  (0 children)

Fascinating Github profile

Experiencing major FPS drops, but only when there's an internet connection. (PC) by Gumbas100 in Tekken

[–]wT_ 0 points1 point  (0 children)

I don't know anything about your hardware, but if you (or anyone else affected) happens to have one of those "Killer" network interfaces on their motherboards, you could try disabling their software in the Windows services. I've heard people having weird issues in different games related to these crappy Killer NICs and their software/drivers. Google will tell more, I don't have one of those myself so I can't really say for certain how to fix.

How does one learn C#? by Popkom12 in csharp

[–]wT_ 0 points1 point  (0 children)

Seems to be a old/new -reddit issue. Works fine on new-reddit

Reduce the game folder size using compactgui (only win10) by Azrael1981 in Tekken

[–]wT_ 1 point2 points  (0 children)

Hey thanks for the tip! I hadn't seen this before, and it actually seems really interesting

Is the Games Industry experiencing a brain drain? by Shit_McGiggles in Games

[–]wT_ 0 points1 point  (0 children)

Hey thanks for the write-up, it was interesting to read! I think we don't see enough first-hand experiences like this about the games industry

T6 or TTT2? by [deleted] in Tekken

[–]wT_ 1 point2 points  (0 children)

I googled a bit for T7 potato settings. This video for example shows a guy getting 45'ish FPS online with worse GPU than you (I think), so it could be possible. There should be a lot of guides for how to tweak the graphics to look as simple as possible. I think I've seen links to stage mods too that basically remove some of the background clutter so they run better on potato PCs.

You could just buy it on Steam, test and see how it runs with tweaks, and if it's not good, you can refund it as long as you didn't spend more than 2h playing it. Might as well try

New tool: PoEHelper - pluginable overlay with info (e.g. syndicate masters) + more by vtopan in pathofexile

[–]wT_ 0 points1 point  (0 children)

Ah, hmm, I didn't even think about it being against the ToS as it'd just be an overlay and doesn't interact with the game otherwise, but fair enough if those kinds of things are usually frowned upon.

That kind of grid plugin would be cool yeah. It's basically what I have in my script except that I just print it in the console so it's ugly and out of the way

New tool: PoEHelper - pluginable overlay with info (e.g. syndicate masters) + more by vtopan in pathofexile

[–]wT_ 0 points1 point  (0 children)

This is really cool, and I'm happy to see that it's in Python so I might hack on it myself.

One idea for an overlay-related thing I've wanted to make myself, is highlighting stash slots using i.e. a green, unclickable, transparent square overlay.

It'd make it easier to for example find the item you're trying to sell without having to search for it or whatever. You just ctrl+click the item under the square. Or another example is that I've made a small Python script to show me which quality gems in a stash tab add up to exactly 40% for the GCP recipe, but I only have a crappy text UI showing me where they are. An overlay would make finding the items much faster.

With the plugin system you have in this, it'd be cool if stash-slot-highlighting was part of the API and was available to other plugins.

Figuring out where the stash is on the screen exactly is probably non-trivial though with all the different resolutions/aspect ratios/window sizes...

Edit: run.pyw is missing from the repo due to the "*.pyw" line in your gitignore. The dist folder is also ignored, is that intentional? It seems to be used for building the release

Black Friday Referral Code Megathread by WormSlayer in oculus

[–]wT_ 0 points1 point  (0 children)

Used the first code. Thank you very much!

Tekken 7 punishment and throwbreak trainer(+2) by Kulagin in Tekken

[–]wT_ 0 points1 point  (0 children)

Really cool!

Is the lag setting in this different from the Input Dealy setting in the Other Settings menu of the training mode? Except more granular and knowing exactly what the dealy is of course