Skip to content

Commit

Permalink
Merge pull request #7 from sudiptog81/hotfix-6
Browse files Browse the repository at this point in the history
Fixing a SQL Injection Vulnerability
  • Loading branch information
sudiptog81 authored May 3, 2020
2 parents 500c004 + 863703e commit 79fa087
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 241 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2018 Sudipto Ghosh
Copyright (c) 2020 Sudipto Ghosh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ run.bat

> npm start

Server listening on port 5000 # port can be changed on line 7 or 334 of server.js
Server listening on port 5000 # port can be changed on line 9 of server.js
```

For a working example, import the inscluded ESRI shapefiles into your geodatabase.

_Note: Postgres uses **geom** as the geometry column while MySQL seems to use **shape** column for the same. If you have your spatial data on **geom** in a MySQL database, do the following edit in `server.js`_

```js
// line 269 and 278 of server.js
// line 308 and 317 of server.js
...
// change shape to your spatial column (eg geom)
'geometry', ST_AsGeoJSON(shape),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sql2geojson",
"version": "0.2.3",
"version": "0.2.4",
"description": "SQL to GeoJSON API Server",
"main": "server.js",
"scripts": {
Expand All @@ -21,4 +21,4 @@
"pg-hstore": "^2.3.2",
"promise-mysql": "^3.3.1"
}
}
}
Loading

0 comments on commit 79fa087

Please sign in to comment.