Comments (13)
That would seem to indicate that the server is computing a different validation signature from what is generated by the Android app. The POST fields from the MMS parts (i.e. file uploads) shouldn't be included in the validation check algorithm...
Is your server using the EnvayaSMS php server library for request validation or your own code?
If you remove the validation check, does it work?
from envayasms.
Also does this mean that sometimes EnvayaSMS does not crash when you receive incoming MMS?
from envayasms.
So far today no app crashes. We've successfully forwarded an MMS before, haven't repeated it though. About the php server library, I'm still checking with the site developer.
from envayasms.
Yes, we are using the EnvayaSMS php server library (along with the drupal module)
from envayasms.
OK I added some debug code to look at the received vs. expected signature and found there is a mismatch, e.g.
mo555Z5u1HBY5HNkXjmH6VeiPdY= vs. GMCIitXjeCuIgP+6K8FCgIefL5s= I also am dumping the $data array to a file each time we receive a message.
I found this $data array includes $data['mms_parts'] a JSON string describing the MMS parts, as well as the actual MMS attachments: $data['part0'] $data['part1'] $data['part2'] - the last is raw jpeg data. If these MMS parts aren't supposed to be there, then maybe this is the cause for the invalid signature? i don't see any logic in the PHP library to remove these parts from the data array.
This issue is on a phone running Android 2.3.6 - have not seen this issue on my phone running Android 2.3.4
from envayasms.
Also, it looks like the file uploads as received from Android 2.3.6 aren't being processed correctly by PHP - not saved to a temporary file etc.
from envayasms.
Interesting ... PHP should automatically place part0, part1, part2, etc. in the $_FILES array instead of the $_POST array.
I think that could happen if EnvayaSMS failed to send a filename or content type in the multipart post data.
I'm guessing it's a similar issue to the other MMS bug, where EnvayaSMS attempts to read data from the Android MMS database before it's completely written.
from envayasms.
Probably missing filename, because the mms_parts does have content type. I believe $_FILES array is showing up completely empty - there is no numeric 'error', error just does not exist.
i actually can work around this on the PHP side, just need logic to detect when file data is in $_POST, generate a random filename and save it.
from envayasms.
If the parts do have a content type, I guess it's probably it's not a timing issue then, maybe just some mms parts don't have filenames. I'll just generate a random filename on the EnvayaSMS side in that case.
from envayasms.
Could you install EnvayaSMS-mmstest.apk from https://github.com/youngj/EnvayaSMS/downloads and let me know if that fixes the problem?
It generates a random filename if the filename is empty.
It also should prevent the crash from the other MMS bug. But I'm not sure if it will eventually forward the MMS or not... Could you try it and let me know if you see the log message:
"Ignoring MMS [id] for now because sender number is null"
And if you do get that log message, is the MMS eventually forwarded to the server? If not, try sending another MMS after that, and then is the previous MMS forwarded to the server?
from envayasms.
I was able to reproduce this and verify that the fix worked for me. The fix is included in EnvayaSMS version 2.0.5 on Android Market / Google Play : https://play.google.com/store/apps/details?id=org.envaya.sms
The new version is also available on the GitHub downloads page.
from envayasms.
Thanks youngj! It actually worked We've been using it for several days now. :)
from envayasms.
Great!
I'd still recommend updating from EnvayaSMS-mmstest.apk to the new release 2.0.5, as it includes additional bug fixes and functionality improvements as noted here: f53ccc3
from envayasms.
Related Issues (20)
- force quitting after phone receives MMS HOT 8
- Signature check fails if Server URL is domain with no trailing slash
- double sim card HOT 3
- errors when sending sms (in arabic)
- MMS results in invalid password
- Invalid response type text/xml or html HOT 2
- Problem running envayaSMS apk
- Question - Why org.apache.http.client.HttpClient instead of android.net.http.AndroidHttpClient?
- Crash Report
- Configuration Problem
- httpserver.php file missing
- Beginner Issue HOT 2
- expansion packs code HOT 3
- Empty MMS files posted HOT 2
- Server receiving blank post request HOT 2
- Application Not Responding (ANR) issue... HOT 1
- WHat is AMQP? HOT 1
- cloudamqp and EnvayaSMS HOT 1
- Can't manage to make extension packs working HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envayasms.