Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing some minor bugs found in backend #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

agatatalita
Copy link
Member

No description provided.

@agatatalita agatatalita requested a review from mrkvon April 1, 2018 16:09
for(const i in discoveredInfo){
if(!(await models.tag.exists(discoveredInfo[i])))
await models.tag.create({tagname: discoveredInfo[i], creator: username});
await models.userTag.create({ username, tagname: discoveredInfo[i], story: 'story' ,relevance: 5});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a space should be after coma (i.e. story: 'story', relevance: ...)

should(tags).containEql('ditup-spirit-WTF');
});

it('do not add special tags if not playing with some people', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good detailed tests 👍

tags = tags.map((userTag) => {return userTag.tag.tagname;});
should(tags).not.containEql('some-strange-books');
should(tags).not.containEql('it-is-possible-to-eat-a-lot-and-not-get-fat');
should(tags).not.containEql('should-I-leave-my-job');
Copy link
Member

@mrkvon mrkvon Apr 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I in uppercase may be confusing (the tagnames should be in lowercase)

@mrkvon
Copy link
Member

mrkvon commented Apr 1, 2018

Nice catches @agatatalita ! 👍

The code is currently running live at https://dev.ditup.org.
Enjoy.
We need to create user yanka there. (done)

@mrkvon
Copy link
Member

mrkvon commented Apr 1, 2018

There is a security issue: It would be possible to find preciseLocation of yanka by trial and error (when will i get the useful information? where is the center of this area?) So yanka will have troubles with obfuscating her location. How to solve this, @agatatalita?

@agatatalita
Copy link
Member Author

agatatalita commented Apr 1, 2018

It is a good point @ yanka (ups, other yanka). I don't see a good way in which we can get a nice reaction that we are close to yanka and keep yanka's location not discovered. It seems to be always a trade between accuracy and not showing the accurate location.
Only one solution which we should go for is to ask yanka to change her location quite often.

@agatatalita
Copy link
Member Author

Stil wondering whether you cannot do the similar thing with the fuzzy location. Will we not get just a ring around our place? @mrkvon and @yanka2

@mrkvon
Copy link
Member

mrkvon commented Apr 2, 2018

This is a great work.
But are you, @agatatalita , comfortable with closing it eventually and not merging it to production?

@agatatalita
Copy link
Member Author

agatatalita commented Apr 2, 2018

Did we(ha!) just skipped my question about the fuzzy location?

@mrkvon
Copy link
Member

mrkvon commented Apr 2, 2018

The fuzzy location works as follows: Whenever you update your preciseLocation, a randomized location is created and used for everything besides changing itself. preciseLocation is not leaked. And now I see, there is not a security issue here, either. We just need to replace someImportantPerson.preciseLocation with someImportantPerson.location.

@agatatalita
Copy link
Member Author

OK, that is great, I was worried it makes it random every time. Let's correct it and merge with master.

Thank you for your explanation.

@mrkvon
Copy link
Member

mrkvon commented Apr 23, 2018

This was fun.
🚀 🎈 🙂

@mrkvon mrkvon closed this Apr 23, 2018
@agatatalita agatatalita reopened this Apr 23, 2018
@agatatalita
Copy link
Member Author

Just one only one piece of fix. Just this very very little one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants