Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Directories & files fuzzFailed, Error: KeyError('subdomain_id') #17

Closed
1 task done
psyray opened this issue Apr 22, 2024 · 1 comment · Fixed by #88
Closed
1 task done

bug: Directories & files fuzzFailed, Error: KeyError('subdomain_id') #17

psyray opened this issue Apr 22, 2024 · 1 comment · Fixed by #88
Labels
bug Something isn't working

Comments

@psyray
Copy link
Contributor

psyray commented Apr 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Reported by @zinwelzl & @burper00

Whlle fuzzing dir this error could occurs.

@burper000 submit a solution below, it needs tests

I fix it maybe please check it for is it really stable code?
Change rEngine /web/reNgine/tasks.py in

Get subdomain and add dirscan

		if ctx['subdomain_id'] > 0:
			subdomain = Subdomain.objects.get(id=ctx['subdomain_id'])
		else:
			subdomain_name = get_subdomain_from_url(endpoint.http_url)
			subdomain = Subdomain.objects.get(name=subdomain_name, scan_history=self.scan)
		subdomain.directories.add(dirscan)
		subdomain.save()

to:

Get subdomain and add dirscan

		subdomain_id = ctx.get('subdomain_id')  

		if subdomain_id:  

		    	subdomain = Subdomain.objects.get(id=subdomain_id)

		else:

		    	subdomain_name = get_subdomain_from_url(endpoint.http_url)

		    	subdomain = Subdomain.objects.get(name=subdomain_name, scan_history=self.scan)



		subdomain.directories.add(dirscan)

		subdomain.save()

Its looks all of the problem script cant get subdomain_id key

Please make it fully fix I wait for new version.

Expected Behavior

Fuzzing should not fail, error should be catched

Steps To Reproduce

Not clear on original post, there's not a real url to test and make the bug happens.
Need tests

Environment

- reNgine: Rengine 2.0.3
- OS: Kali 2024.01 fully updated.
- Python: 
- Docker Engine: 
- Docker Compose: 
- Browser:

Anything else?

No response

@psyray psyray added the bug Something isn't working label Apr 22, 2024
@zinwelzl
Copy link

zinwelzl commented Apr 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants