diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0120af5496..a2bcea0af5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -31,6 +31,7 @@ This file lists the contributors to the PureScript compiler project, and the ter - [@jacereda](https://github.com/jacereda) (Jorge Acereda) My existing contributions and all future contributions until further notice are Copyright Jorge Acereda, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@japesinator](https://github.com/japesinator) (JP Smith) My existing contributions and all future contributions until further notice are Copyright JP Smith, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@joneshf](https://github.com/joneshf) (Hardy Jones) - My existing contributions and all future contributions until further notice are Copyright Hardy Jones, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license. +- [@kika](https://github.com/kika) (Kirill Pertsev) - My existing contributions and all future contributions until further notice are Copyright Kirill Pertsev, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license. - [@kRITZCREEK](https://github.com/kRITZCREEK) (Christoph Hegemann) - My existing contributions and all future contributions until further notice are Copyright Christoph Hegemann, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license. - [@L8D](https://github.com/L8D) (Tenor Biel) My existing contributions and all future contributions until further notice are Copyright Tenor Biel, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@leighman](http://github.com/leighman) (Jack Leigh) My existing contributions and all future contributions until further notice are Copyright Jack Leigh, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). diff --git a/psc-ide-client/Main.hs b/psc-ide-client/Main.hs index 17c05963e5..79532e51e1 100644 --- a/psc-ide-client/Main.hs +++ b/psc-ide-client/Main.hs @@ -35,7 +35,7 @@ main = do client :: PortID -> IO () client port = do h <- - connectTo "localhost" port `catch` + connectTo "127.0.0.1" port `catch` (\(SomeException e) -> putStrLn ("Couldn't connect to psc-ide-server on port: " ++ diff --git a/psc-ide-server/Main.hs b/psc-ide-server/Main.hs index c19c7ca829..aa8085bdac 100644 --- a/psc-ide-server/Main.hs +++ b/psc-ide-server/Main.hs @@ -40,10 +40,10 @@ import Language.PureScript.Ide.Util import Language.PureScript.Ide.Error import Language.PureScript.Ide.Types import Language.PureScript.Ide.Watcher -import Network hiding (socketPort) +import Network hiding (socketPort, accept) import Network.BSD (getProtocolNumber) import Network.Socket hiding (PortNumber, Type, - accept, sClose) + sClose) import Options.Applicative import System.Directory import System.FilePath @@ -167,7 +167,9 @@ acceptCommand sock = do pure (cmd, h) where acceptConnection = liftIO $ do - (h,_,_) <- accept sock + -- Use low level accept to prevent accidental reverse name resolution + (s,_) <- accept sock + h <- socketToHandle s ReadWriteMode hSetEncoding h utf8 hSetBuffering h LineBuffering pure h