Prod_Is_For_Testing

u/Prod_Is_For_Testing


r/webdev•

I know about caniuse.com to get the browser compatibility of a single feature.

Is there a similar tool to analyze all of the CSS on my site to check for compatibility? I want to know the minimum browser versions that my site will work on

12

r/typescript•

I’m trying to figure out if it’s possible to create a function that will accept the following parameter combinations

DoWork(false)

Or

DoWork(true, 123)

If the first argument is false, then there shouldn’t be a second argument. If the first argument is true, the second argument should be a number.

Is it possible to do this using TS types and unions?

Thanks

1310

r/typescript•

Hello, I recently ran into a problem with some async web calls and Im trying to get to the root cause. I think I fixed it, but I want to learn more about how async works in TS/JS

​

I basically started with this code:

async function Function1(): Promise<void> {
    if(someCondition) {
        return Function2()    //NOTE: Im returning a promise without awaiting
    }
    await doWork();
}

async function Function2(): Promise<void>  => await work();

I later changed it to this code and my errors seem to be fixed:

async function Function1(): Promise<void> {
    if(someCondition) {
        await Function2();    //he
13

r/csharp•

Using Microsoft DI framework along with MS Options and MS Configuration.

I am trying to call IServiceCollection.Configure<>() to expose an interface but bind to a specific concrete class. This can be done with IServiceCollection.AddSingleton<>(), but not with Configure. I'm looking for a solution

Here is an example of what I want

//config objects
interface IConfigPoco {
    IReadonlyList<string> Names { get; }
}
class ConfigPoco : IConfigPoco {
   private List<string> Names { get; set; }
   IReadonlyList<string> IConfigPoco.Names => Names;
}

//registration
//this is the part that does not work
//Config
38

r/csharp•

I upgraded from VS 16.7.x to the new 16.8, and several project types are now broken.

So far I’ve noticed Xamarin Android, Xamarin iOS, and unity will not load. The projects show incompatible status. I’ve had to rollback to a 16.7 install.

Is anyone else having these issues?

513

r/csharp•

I've been trying to figure out if 2 code blocks are equivalent. The crux of the problem is the behavior of async lambda functions

​

Snippet 1:

async Task DoWork()
{
    await Task.Delay(1000);
    MessageBox(...)
}

Main()
{
    Task.Run(DoWork);
}

​

Snippet 2:

async Task DoWork()
{
    await Task.Delay(1000);
    MessageBox(...)
}

Main()
{
    Task.Run(async ()=> {await DoWork(); });
}
62

r/XyfirTesting•

A handful of suggestions now that I've had some time to poke around

In multiple places, there are input type="number" for user input fields. With this setup, things like phone numbers and credit cards will get little increment arrows on the side of the text box - obviously, that doesnt make much sense. Using type="text" better matches the data. You can use a little JS to limit input and validate data (of course, you should also be validating server side) This is typescript, but you get the idea:

//check if the characters bein
23

r/XyfirTesting•

For a product claiming to improve personal security by hiding information, Ptorx asks for a significant amount of personal info. Why is all of that necessary? How is it protected?

Are your databases secure enough to safely store that data? What efforts have you taken to reduce the attack surface? Are the DB ports properly firewalled? Is low access data (like full name, address, phone #) encrypted on disk? If so, what's the key size? If not, why not? Have you protected against SQL injection attacks?

For people wanting a security application, open disclosure of security practices is a key factor

21

r/XyfirTesting•

You're missing several security related HTTP headers. You can add a certain level of protection by setting a few of them

You specify in your TOS that the site should not be placed in iframe, but you take no steps to mitigate that risk. To prevent other sites rendering a frame of yours: X-Frame-Options: sameorigin

To prevent MIME attacks add X-Content-Type-Options:nosniff

Force XSS protection (browser based, may or may not make a real difference) X-XSS-Protection:1; mode=block

Remove Server:nginxheader. It improves security through obscurity so that attackers can't see what server type youre running and narrow down their attack vectors

Make a Content-Security-Policy header with

22

r/XyfirTesting•

Page: https://accounts.xyfir.com/app/#/register/13

You give the user two options on the create profile page. One says "Load Data from Profile" the other says "Set Custom Data"

There isn't really an indication that the "Set Custom Data" tab is in fact creating a new profile, so I would change the name of the tab to "Create New Profile." That way users know that the two tabs are actually the inverse of each other. Otherwise, they may go to the "Load from Profile" tab and wonder where to create a profile.

28