Skip to content

Commit

Permalink
🧑🏾‍🦰 Add fxp to allowed origins
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzak committed Aug 17, 2020
1 parent 3ebad8a commit 18b826e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
22 changes: 9 additions & 13 deletions app/meteor/imports/api/clients/actions/register.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { ValidatedMethod } from 'meteor/mdg:validated-method'
import { SimpleSchema } from 'meteor/aldeed:simple-schema'
import { CallPromiseMixin } from 'meteor/didericis:callpromise-mixin'
import { Settings } from '../../settings'
import { Events } from '../../events'
import { action } from '../../../util/meteor/action'

export const register = ({ Clients }) => {
return new ValidatedMethod({
export const register = ({ Clients }) =>
action({
name: 'clients/register',
mixins: [CallPromiseMixin],
validate: new SimpleSchema({
clientKey: { type: String, min: 200 },
systemInfo: { type: Object, blackbox: true }
}).validator(),

run ({ clientKey, systemInfo }) {
args: {
clientKey: String,
systemInfo: Object
},
allowAnonymous: true,
fn ({ clientKey, systemInfo }) {
if (this.isSimulation) {
return { isOk: true }
}
Expand Down Expand Up @@ -50,4 +47,3 @@ export const register = ({ Clients }) => {
}
}
})
}
8 changes: 4 additions & 4 deletions app/meteor/imports/client/patientAppointments/Consents.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ export const Popover = withTracker(composer)(({
scan({ mediaTag, patientId, appointmentId })
}

const handleSelectPastAppointmentConsent = appointmentId => {
const handleSelectPastAppointmentConsent = pastAppointmentId => {
const pastAppointment = Appointments.findOne({ _id:
appointmentId })
pastAppointmentId })

if (!pastAppointment) {
throw new Error(`handleSelectPastAppointmentConsent: Cannot find past appointment with id ${appointmentId}`)
throw new Error(`handleSelectPastAppointmentConsent: Cannot find past appointment with id ${pastAppointmentId}`)
}

const consentMediaIds = uniq([
Expand Down Expand Up @@ -177,7 +177,7 @@ export const Popover = withTracker(composer)(({
edge='start' />
</ListItemIcon>

<span>{moment(a.start).format(__('time.dateFormat'))}</span>
<span>{JSON.stringify(a.consentMedias.map(m => m._id))} + {JSON.stringify(appointment.consentMediaIds)} {moment(a.start).format(__('time.dateFormat'))}</span>
<TagsList tiny showDuration={false} tags={a.tags} />
<div style={drawerStyle}>
{a.consentMedias.map(m =>
Expand Down
1 change: 1 addition & 0 deletions app/meteor/imports/startup/client/native/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const postToNative = (name, payload) => {
const isValidOrigin = url => {
if (!url) { return false }
if (url.match(/^https:\/\/.*\.rslnd\.com$/)) { return true }
if (url.match(/^https:\/\/.*\.fxp\.at$/)) { return true }
if (process.env.NODE_ENV === 'development' && url.match(/^http:\/\/localhost:3000$/)) { return true }
return false
}
2 changes: 1 addition & 1 deletion app/meteor/public/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Contact: mailto:me@albertzak.com
Contact: mailto:security@rslnd.com
Contact: mailto:security@fxp.at
Encryption: https://keybase.io/albertzak
Preferred-Languages: en, de

0 comments on commit 18b826e

Please sign in to comment.