mirror of
https://github.com/xfarrow/blink
synced 2025-04-14 16:51:58 +02:00
removed osm data fetcher for now
This commit is contained in:
parent
c164728a9b
commit
95f9973f21
@ -40,7 +40,7 @@ async function addOrganizationAdministrator(personId, organizationId, requester)
|
|||||||
|
|
||||||
const isRequesterAdmin = await isPersonOrganizationAdministrator(requester, organizationId);
|
const isRequesterAdmin = await isPersonOrganizationAdministrator(requester, organizationId);
|
||||||
const isPersonAdmin = await isPersonOrganizationAdministrator(personId, organizationId);
|
const isPersonAdmin = await isPersonOrganizationAdministrator(personId, organizationId);
|
||||||
// TOCTOU
|
// Unexploitable TOCTOU
|
||||||
if (isRequesterAdmin && !isPersonAdmin) {
|
if (isRequesterAdmin && !isPersonAdmin) {
|
||||||
await knex('OrganizationAdministrator')
|
await knex('OrganizationAdministrator')
|
||||||
.insert({
|
.insert({
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
const OsmRateLimiter = {
|
|
||||||
lastFetchTime: 0,
|
|
||||||
|
|
||||||
canFetch: function () {
|
|
||||||
return Date.now() - this.lastFetchTime >= 1000;
|
|
||||||
},
|
|
||||||
|
|
||||||
updateFetchTime: function () {
|
|
||||||
this.lastFetchTime = Date.now();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function retrieveCitiesFullName(name){
|
|
||||||
if (!OsmRateLimiter.canFetch()) {
|
|
||||||
// todo
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user