Pieter Jansens

Ranch Hand
+ Follow
since Feb 14, 2023
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Pieter Jansens

Thanks Les, same to you and the other members of the forum.
I figured it out what the issue was, I was executing the code in the .then() of the submit, moving it to a useEffect solved the issue
9 months ago
Einstein defines madness as "Doing the same thing over and over again whilest expecting different results"

So explain to me why a method when executed the second time works as expected, while when executed the first time with the same parameters, it fails?

Context: I'm loging in from a react frontend to a springboot graphql backend. The response from the backend is twice the same, what it should be. Yet for some reason when first executed this if method isn't executed:


the response:
9 months ago
When working with nosql db, neo4j, is it better to keep a single object or a list?
For example: Imagen a forum, users have posts and thoose posts have comments placed by a user.
How would you guys design that? Would you keep a user object in post and a post and user in commments or would you keep a list of posts in users, a list of comments in posts and, then still you would have to descide if you keep a list of comments in user, or keep a user in comments.

I designed it first with a single object, but I use graphql and for schemamapping keeping lists seems more effecient?
9 months ago
@Schemamapping returns the entity and it's relationschips, but does it only return relationships defined in the node or also more complex relationships?
9 months ago
As I stated in the original question, once I mark the class as open, it compiles, but my service isn't autowired
9 months ago
This is the full stacktrace:
9 months ago
If it wouldn't be, intellij would tell me so, but yes it is
9 months ago
This class works fine:

But once I uncomment the PreAUthorize annotation ithe program dosn't compile anymore.

When i mark de controllerClass as open, it compiles, but when executing the methods my userservice isn't autowired.... Any ideas?
9 months ago
If i change the header to Bearer Authentication I'm getting this error:

That's in graphiql, in the console I'm not getting any errors, but the query isn't executed neighter
9 months ago
I trying to establish a basic security set up for a graphqlApi using a neo4j db.
I able to register and to login, after login in I get the correct Authentication, but for some reasson when I preAuthorize my qerries with a role I'm getting an unauthorized.
This is what I have so far:






The userservice implements the UserDetailService




when i print the auth:
It could be as simple as passing the wrong header: I'm passing: "x-auth-token". Any ideas?
9 months ago
It's a pure html and css website, the only php I use is the mailscript and to display a message after the contactform is sent
I'm not doing anythin at all with the information besides mailling it to myself
He left a fingerprint though he used Acunetix Website Security Scanner to scan for vunerabilities and I have his account name

this is an example mail:


I should express myself better. I guess he (or she) didn't traverse the path by sending emails, they used it to some how explore my files and then used the browser to navigate

Except from making sure my inputfields match the required regular expression, this is the main thing I do know I didn't before:


By stripping all Backslashes and converting special charachters to htmlentitities, I should be able to prevent users from executing scripts on my server, I guess that should be enough?
I detected the attack cause I got spammed with email. When checking the emails I noticed he was using the name and subjectline of the contactform to navigate my path.
I instictively shut my server down, more so cause I never came across it, I actually didn't know what was happening, I just knew something wasn't right.
A googlesearch later it seems like textbook pathtraversal. I started by validating the inputfileds of my form better, i think that would be the first and most important step?!
And that's about how far I got so far
I'm hosting a small website on a xamppserver at home, yes I know, you shouldn't use xampp in production, but it's a simpe informatical website.
Be as it may yesterday someone managed by sending emails through the contactform to traverse the path and open files on my computer.
I noticed what he was doing before he could any harm. it's my first attack and the question rices how to IU prevent visitors from exploiting my path?
This is my first angular experience and I was following an online tutorial. It's a simple servermanagerapp, everything works as expected, but to save a new server we had to use a form in a model and like it was explained in the tutorial, I couldn't make it work, so I had to improvise and had to place to modal in a seperate component. The modal is working, it calls the correct method and I'm able to get the formdata, but in the save method it is suposed to call my service to make the apicall, for some reasson it isn't called. In webstorm I can see, by pressing ctrl en clicking, that it points to the correct service(method). I have no console-errors and no idea what I'm doing wrong, any help would grately be appreciated.

My PopupComponent.ts


My Service:


MyAppComponent


With the appcomponent there aren't any issues, I'm just giving a full overview of what I''m doing. The appcomponent is also able to correctly execute all methods. In the tutorial he keeps everything in one component, but that shouldn't be an issue right? He also uses modal, I wasn't able to implement it, so I went for matDialog
11 months ago