GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Error : Invalid memory address or nil pointer dereference · Issue #27 · projectdiscovery/simplehttpserver

Error : Invalid memory address or nil pointer dereference #27

New issue
Copy link
New issue
Copy link
Closed
#33
#29
Closed
Error : Invalid memory address or nil pointer dereference#27
#33
#29
Copy link
Assignees
Mzack9999
Labels
Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.Type: QuestionA query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.

Description

@rtcms
rtcms
opened on Apr 17, 2021
Issue body actions

Syntax Used - simplehttpserver -basic-auth root:root -upload -listen 0.0.0.0:3000

Error

Serving /home/r on http://0.0.0.0:3000/
2021/04/17 05:57:29 http: panic serving X.X.X.X:29799: runtime error: invalid memory address or nil pointer dereference
goroutine 6 [running]:
net/http.(*conn).serve.func1(0xc000099040)
	/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x7f5e00, 0xb0c220)
	/usr/local/go/src/runtime/panic.go:975 +0x47a
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).basicauthlayer.func1(0x8d72e0, 0xc0000d8810, 0xc0000de400)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/authlayer.go:12 +0xd7
net/http.HandlerFunc.ServeHTTP(0xc00000eae0, 0x8d72e0, 0xc0000d8810, 0xc0000de400)
	/usr/local/go/src/net/http/server.go:2042 +0x44
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).loglayer.func1(0x8d75e0, 0xc0000962a0, 0xc0000de400)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/loglayer.go:23 +0x109
net/http.HandlerFunc.ServeHTTP(0xc00000eb00, 0x8d75e0, 0xc0000962a0, 0xc0000de400)
	/usr/local/go/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000961c0, 0x8d75e0, 0xc0000962a0, 0xc0000de400)
	/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc000099040, 0x8d8220, 0xc000068bc0)
	/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2969 +0x36c
2021/04/17 05:57:59 http: panic serving X.X.X.X:29800: runtime error: invalid memory address or nil pointer dereference
goroutine 18 [running]:
net/http.(*conn).serve.func1(0xc000124000)
	/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x7f5e00, 0xb0c220)
	/usr/local/go/src/runtime/panic.go:975 +0x47a
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).basicauthlayer.func1(0x8d72e0, 0xc0001201b0, 0xc000134000)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/authlayer.go:12 +0xd7
net/http.HandlerFunc.ServeHTTP(0xc00000eae0, 0x8d72e0, 0xc0001201b0, 0xc000134000)
	/usr/local/go/src/net/http/server.go:2042 +0x44
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).loglayer.func1(0x8d75e0, 0xc000140000, 0xc000134000)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/loglayer.go:23 +0x109
net/http.HandlerFunc.ServeHTTP(0xc00000eb00, 0x8d75e0, 0xc000140000, 0xc000134000)
	/usr/local/go/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000961c0, 0x8d75e0, 0xc000140000, 0xc000134000)
	/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc000124000, 0x8d8220, 0xc00012c000)
	/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2969 +0x36c
2021/04/17 05:58:00 http: panic serving X.X.X.X:29801: runtime error: invalid memory address or nil pointer dereference
goroutine 8 [running]:
net/http.(*conn).serve.func1(0xc0000990e0)
	/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x7f5e00, 0xb0c220)
	/usr/local/go/src/runtime/panic.go:975 +0x47a
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).basicauthlayer.func1(0x8d72e0, 0xc0001202d0, 0xc0000de700)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/authlayer.go:12 +0xd7
net/http.HandlerFunc.ServeHTTP(0xc00000eae0, 0x8d72e0, 0xc0001202d0, 0xc0000de700)
	/usr/local/go/src/net/http/server.go:2042 +0x44
github.com/projectdiscovery/simplehttpserver/pkg/httpserver.(*HTTPServer).loglayer.func1(0x8d75e0, 0xc0001400e0, 0xc0000de700)
	/home/r/go/pkg/mod/github.com/projectdiscovery/[email protected]/pkg/httpserver/loglayer.go:23 +0x109
net/http.HandlerFunc.ServeHTTP(0xc00000eb00, 0x8d75e0, 0xc0001400e0, 0xc0000de700)
	/usr/local/go/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000961c0, 0x8d75e0, 0xc0001400e0, 0xc0000de700)
	/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0000990e0, 0x8d8220, 0xc000068d40)
	/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2969 +0x36c

simplehttpserver -listen 0.0.0.0:3000 works as expected

Activity

  1. rtcms commented on Apr 17, 2021

    @rtcms
    rtcms
    on Apr 17, 2021
    Author
    More actions

    OOPS Github spoiled the formatting
    Please check the Error - https://pastebin.com/yKEtg2mB

  2. ehsandeep commented on Apr 17, 2021

    @ehsandeep
    ehsandeep
    on Apr 17, 2021
    Member
    More actions

    @rtcms

    Did you make an additional POST request or any more steps to reproduce this?

    simplehttpserver -basic-auth root:root -upload -listen 0.0.0.0:3000
    
       _____ _                 __     __  __________________                                
      / ___/(_)___ ___  ____  / /__  / / / /_  __/_  __/ __ \________  ______   _____  _____
      \__ \/ / __ -__ \/ __ \/ / _ \/ /_/ / / /   / / / /_/ / ___/ _ \/ ___/ | / / _ \/ ___/
     ___/ / / / / / / / /_/ / /  __/ __  / / /   / / / ____(__  )  __/ /   | |/ /  __/ /    
    /____/_/_/ /_/ /_/ .___/_/\___/_/ /_/ /_/   /_/ /_/   /____/\___/_/    |___/\___/_/     
                    /_/                                                       - v0.0.2
    
    		projectdiscovery.io
    
    Use with caution. You are responsible for your actions
    Developers assume no liability and are not responsible for any misuse or damage.
    Serving test on http://0.0.0.0:3000/
    
  3. ehsandeep
    added
    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
    Type: QuestionA query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.
    on Apr 17, 2021
  4. rtcms commented on Apr 17, 2021

    @rtcms
    rtcms
    on Apr 17, 2021
    Author
    More actions

    Nope I made a GET request (Visit my VPS's IP:3000 URL) - in-fact 3 GET requests for the error to occur three times
    I just tried and POST method which also gives me similar error

  5. Mzack9999
    added a commit that references this issue on Apr 17, 2021

    fixing crash in #27

    0712f0b
  6. Mzack9999
    self-assigned this
    on Apr 17, 2021
  7. Mzack9999
    linked a pull request that will close this issuefixing crash #29on Apr 17, 2021
  8. bing0o commented on Apr 17, 2021

    @bing0o
    bing0o
    on Apr 17, 2021
    More actions

    I have the same problem when I try to upload a file
    error

  9. ehsandeep
    linked a pull request that will close this issueMinor crash fix #33on Apr 18, 2021
  10. ehsandeep
    closed this as completedin #33on Apr 18, 2021
  11. ehsandeep commented on Apr 18, 2021

    @ehsandeep
    ehsandeep
    on Apr 18, 2021
    Member
    More actions

    @bing0o @rtcms this crash is now fixed with #29, we also created a new release, just update the to latest version and this should be fixed now.

    Reacted by med pro and Raviteja
  12. bing0o commented on Apr 18, 2021

    @bing0o
    bing0o
    on Apr 18, 2021
    More actions

    @ehsandeep thank you, it works now :)

    Reacted by Sandeep Singh
  13. rtcms commented on Apr 18, 2021

    @rtcms
    rtcms
    on Apr 18, 2021
    Author
    More actions

    @ehsandeep thank you, it works now :)

    +1

    Reacted by Sandeep Singh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Mzack9999
    Mzack9999

Labels

Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.Type: QuestionA query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.