git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into pure11-0.9
843a542Andy Arvanitis
CONTRIBUTORS.md+1
@@ -31,6 +31,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
31- [@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).
31- [@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).
32- [@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).
32- [@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).
33- [@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.
33- [@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.
34+- [@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.
34- [@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.
35- [@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.
35- [@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).
36- [@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).
36- [@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).
37- [@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).
psc-ide-client/Main.hs+1−1
@@ -35,7 +35,7 @@ main = do
35client :: PortID -> IO ()
35client :: PortID -> IO ()
36client port = do
36client port = do
37 h <-
37 h <-
38− connectTo "localhost" port `catch`
38+ connectTo "127.0.0.1" port `catch`
39 (\(SomeException e) ->
39 (\(SomeException e) ->
40 putStrLn
40 putStrLn
41 ("Couldn't connect to psc-ide-server on port: " ++
41 ("Couldn't connect to psc-ide-server on port: " ++
psc-ide-server/Main.hs+5−3
@@ -39,10 +39,10 @@ import Language.PureScript.Ide.Util
39import Language.PureScript.Ide.Error
39import Language.PureScript.Ide.Error
40import Language.PureScript.Ide.Types
40import Language.PureScript.Ide.Types
41import Language.PureScript.Ide.Watcher
41import Language.PureScript.Ide.Watcher
42−import Network hiding (socketPort)
42+import Network hiding (socketPort, accept)
43import Network.BSD (getProtocolNumber)
43import Network.BSD (getProtocolNumber)
44import Network.Socket hiding (PortNumber, Type,
44import Network.Socket hiding (PortNumber, Type,
45− accept, sClose)
45+ sClose)
46import Options.Applicative
46import Options.Applicative
47import System.Directory
47import System.Directory
48import System.FilePath
48import System.FilePath
@@ -166,7 +166,9 @@ acceptCommand sock = do
166 pure (cmd, h)
166 pure (cmd, h)
167 where
167 where
168 acceptConnection = liftIO $ do
168 acceptConnection = liftIO $ do
169+ -- Use low level accept to prevent accidental reverse name resolution
169− (h,_,_) <- accept sock
170+ (s,_) <- accept sock
171+ h <- socketToHandle s ReadWriteMode
170 hSetEncoding h utf8
172 hSetEncoding h utf8
171 hSetBuffering h LineBuffering
173 hSetBuffering h LineBuffering
172 pure h
174 pure h