Skip to content

Commit c2635ba

Browse files
authored
Merge pull request #28 from neuroanatomy/master
sync fork
2 parents 669c136 + ec7ca1d commit c2635ba

37 files changed

+1216
-3117
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ admin
55
blacklist.json
66
bulk-upload.sh
77
github-keys.json
8+
js/.DS_Store
89
node_modules
910
npm-debug.log
1011
public/.DS_Store
@@ -20,10 +21,11 @@ public/lib/.DS_Store
2021
public/lib/atlasMaker.js
2122
public/lib/atlasMaker-tools
2223
public/lib/brainbox.js
24+
scripts/atlasMaker-resources.js
2325
test/screenshots/
2426
tmp
2527
view/atlasMaker/dist/
2628
view/atlasMaker/src/tools/dist/
2729
view/brainbox/dist/
2830
whitelist.json
29-
js/.DS_Store
31+
ws_cfg.json

ANNOTATIONS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**Come and join our team of
2-
[BrainMappers](https://github.com/OpenNeuroLab/BrainBox/blob/master/BRAINMAPPERS.md)!!**
2+
[BrainMappers](https://github.com/neuroanatomy/BrainBox/blob/master/BRAINMAPPERS.md)!!**
33
We will be happy to work with anyone who would love to join our effort.
44
While you can see in real-time what your collaborators are writing or drawing on a given
55
data set, you can also chat with them, and ask for help or approval of your work. We want
@@ -14,8 +14,8 @@ Come to our [**dolphin brain**](http://brainbox.pasteur.fr/mri?url=http://brainc
1414

1515
<img width="769" alt="screen shot 2017-06-01 at 11 08 34" src="https://cloud.githubusercontent.com/assets/6297454/26672835/f7892d80-46ba-11e7-8be8-51adbee9288d.png">
1616

17-
When you have done 1 slice,
18-
* add your name or github handle to our [BRAINMAPPERS.md](https://github.com/OpenNeuroLab/BrainBox/blob/master/BRAINMAPPERS.md) file
17+
When you have done 1 slice,
18+
* add your name or github handle to our [BRAINMAPPERS.md](https://github.com/neuroanatomy/BrainBox/blob/master/BRAINMAPPERS.md) file
1919
* add the slice number where you have been working (currently, 111 & 112 are done, you could continue with 113++)
2020
* add "length:..." and
2121
* "volume:..." from the upper left corner of the BrainBox viewer into the file (just for the fun!! :D)

BRAINMAPPERS.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
:sparkles: We are the brain mappers! \ö/ :sparkles:
22

3-
Here, we are segmenting an amazingly folded [**dolphin brain**](http://brainbox.pasteur.fr/mri?url=http://braincatalogue.org/data/Bottlenose_dolphin/MRI-n4.nii.gz&view=cor&slice=143). Once you clicked the link, you will find our work in progress on the dolphin brain in the Braincatalogue project. You can **join our segmentation sprint any time!** You can also choose a different species to work on, if you prefer! Any contributions are featured below. More information on segmenting can be found in our [ANNOTATIONS.md file](https://github.com/OpenNeuroLab/BrainBox/blob/master/ANNOTATIONS.md).
3+
Here, we are segmenting an amazingly folded [**dolphin brain**](http://brainbox.pasteur.fr/mri?url=http://braincatalogue.org/data/Bottlenose_dolphin/MRI-n4.nii.gz&view=cor&slice=143). Once you clicked the link, you will find our work in progress on the dolphin brain in the Braincatalogue project. You can **join our segmentation sprint any time!** You can also choose a different species to work on, if you prefer! Any contributions are featured below. More information on segmenting can be found in our [ANNOTATIONS.md file](https://github.com/neuroanatomy/BrainBox/blob/master/ANNOTATIONS.md).
44

55
<img width="769" alt="screen shot 2017-06-01 at 11 08 34" src="https://cloud.githubusercontent.com/assets/6297454/26672835/f7892d80-46ba-11e7-8be8-51adbee9288d.png">
66

77
**Our BrainMapper team**
88

9-
current Volume segmented: **509 368 mm3** (please update! :D)
9+
initial volume segmented: 509 368 mm3
10+
11+
current volume segmented: **445 823 mm3** (please update! :D)
1012

1113
Name: **name**
1214
GitHub: @
@@ -15,6 +17,12 @@ Slice numbers: axial (cor) __
1517
Length: __ mm
1618
Volume: __ mm3
1719

20+
Name: **faruk**
21+
GitHub: @ofgulban
22+
Species: Bottlenose dolphin
23+
Slice numbers: all
24+
Length: mm
25+
Volume: 445 823 mm3
1826

1927
Name: **katja**
2028
GitHub: @katjaq

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55

66
**Join our segmentation sprints!**
7-
In our [GitHub issue #42](https://github.com/OpenNeuroLab/BrainBox/issues/177) you find
7+
In our [GitHub issue #42](https://github.com/neuroanatomy/BrainBox/issues/177) you find
88
detailed information on how to participate and get credit for your work. Currently, we
99
are trying to complete the dolphin brain!! Join our team of
10-
[BrainMappers](https://github.com/OpenNeuroLab/BrainBox/blob/master/BRAINMAPPERS.md)
10+
[BrainMappers](https://github.com/neuroanatomy/BrainBox/blob/master/BRAINMAPPERS.md)
1111
We will be happy to work with anyone who would love to join our effort.
1212
While you can see in real-time what your collaborators are writing or drawing on a given
1313
data set, you can also chat with them, and ask for help or approval of your work. We want

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Our aim is to make BrainBox into a reliable tool for open, reproducible, collabo
3434

3535
We will be happy to work with anyone who would love to join our effort.
3636
While you can see in real-time what your collaborators are writing or drawing on a given data set, you can also chat with them, and ask for help or approval of your work. We want to open this scientific process to everyone with any background including citizen scientists and researchers. Join us!
37-
**Join our segmentation sprint!** In our [GitHub issue #42](https://github.com/OpenNeuroLab/BrainBox/issues/177) you find detailed information on how to participate and get credit for your work. Currently, we are trying to complete the dolphin brain! Join our team of [BrainMappers](https://github.com/OpenNeuroLab/BrainBox/blob/master/BRAINMAPPERS.md)
37+
**Join our segmentation sprint!** In our [GitHub issue #42](https://github.com/neuroanatomy/BrainBox/issues/177) you find detailed information on how to participate and get credit for your work. Currently, we are trying to complete the dolphin brain! Join our team of [BrainMappers](https://github.com/neuroanatomy/BrainBox/blob/master/BRAINMAPPERS.md)
3838

3939
And please also feel free to join our efforts on GitHub! Everybody very welcome!
4040

app.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ if (DOCKER_DB) {
3636
}
3737

3838
var db = monk(MONGO_DB);
39-
var fs = require('fs');
4039
var expressValidator = require('express-validator');
4140

4241
/* jslint nomen: true */
@@ -197,7 +196,7 @@ app.get('/auth/github/callback',
197196
global.tokenAuthentication = function (req, res, next) {
198197
tracer.log('>> Check token');
199198
let token;
200-
if (req.params.token) {
199+
if (req.params.token)
201200
token = req.params.token;
202201
if(req.query.token)
203202
token = req.query.token;

controller/project/project.controller.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
var async = require("async");
2-
var url = require('url');
3-
var crypto = require('crypto');
4-
var dateFormat = require('dateformat');
5-
var validatorNPM = require('validator');
6-
var async = require('async');
71
const url = require('url');
82
const crypto = require('crypto');
93
const dateFormat = require('dateformat');
@@ -52,7 +46,8 @@ var isProjectObject = function(req,res,object) {
5246

5347
var pr = new Promise(function(resolve, reject) {
5448
var i, k, flag, arr;
55-
var allowed="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.,_- '–:;".split("");
49+
var allowed="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,_- '–:;".split("");
50+
var allowedAlphanumericHyphen="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-".split("");
5651

5752
// 1. Synchronous checks
5853
//----------------------
@@ -96,7 +91,7 @@ var isProjectObject = function(req,res,object) {
9691
console.log("> owner and project shortname present")
9792

9893
// check that shortname is alphanumeric
99-
if(!validatorNPM.isAlphanumeric(object.owner) || !validatorNPM.isAlphanumeric(object.shortname)) {
94+
if(!validatorNPM.isWhitelisted(object.owner, allowedAlphanumericHyphen) || !validatorNPM.isWhitelisted(object.shortname, allowedAlphanumericHyphen)) {
10095
reject({success:false,error:"Invalid owner or project shortname, not alphanumeric"});
10196
return;
10297
}

0 commit comments

Comments
 (0)