ushahidi / SMSSync

SMS gateway for Android powered phones
http://smssync.ushahidi.com
GNU Lesser General Public License v3.0
1.14k stars 492 forks source link

SMS center #15

Open helmers opened 12 years ago

helmers commented 12 years ago

Hi

Would it be possible for you to add when the URL get called, to also include SMS center.

eyedol commented 12 years ago

Hi @helmers,

Why would you want that? Also, what exactly do you mean by include SMS center

olliebennett commented 11 years ago

I believe @helmers is suggesting that as an extra parameter in the POST to the server, the app could include the SMS Center address.

I believe it's possible, through use of android.telephony.SmsMessage.getServiceCenterAddress().

As for possible uses of this, I've not investigated, but perhaps it could be somehow used for basic geo-location functionality? I believe a change in the message center address/number/id/whatever suggests the phone has moved from one region, and into the range of another message center...

2kodes commented 10 years ago

hi, is this issue still open? Getting the sms center might help in situations where one might want to verify the authenticity of the message being received on the server side. Yes the security token or secret can be used but an additional feature such as the sms center will be helpful especially as i think it cannot be faked easily. Where in the code or file may this functionality be added? Unfortunately I am not that good at java else i would have submitted a patch for this. Any pointers will be much appreciated

olliebennett commented 10 years ago

Hi @2kodes

While I have no strong argument for not implementing this feature, I do think it would be mis-guided to rely on it as a means of authentication / security. When you say it "cannot be faked easily", all it would take is for a user to modify the app to hard-code the value, and re-build it to install on their device. Therefore, no app-controlled mechanism like this can be truly secure.

There are a couple of locations you will need to update. The best way to find these is probably to search for something like sent_timestamp or message_id (or other variables which are published in the message to the server).

A few places to start:

I believe you would need to call the getServiceCenterAddress() method that I linked above.

2kodes commented 10 years ago

@olliebennett Thanks for the info. will get on it asap.

eyedol commented 9 years ago

@2kodes any updates?

sizons commented 9 years ago

Doesn't look like much being asked for. I'm going to also give it a try.

eyedol commented 9 years ago

@sizons feel free to go for it. Let me know if you need clarification or any help in getting this implemented.

sizons commented 9 years ago

I will thanks. Let me dive in.