Giter Site home page Giter Site logo

MMS messages not forwarded about envayasms HOT 13 CLOSED

youngj avatar youngj commented on July 30, 2024
MMS messages not forwarded

from envayasms.

Comments (13)

youngj avatar youngj commented on July 30, 2024

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.

youngj avatar youngj commented on July 30, 2024

Also does this mean that sometimes EnvayaSMS does not crash when you receive incoming MMS?

from envayasms.

regaladys avatar regaladys commented on July 30, 2024

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.

mfb avatar mfb commented on July 30, 2024

Yes, we are using the EnvayaSMS php server library (along with the drupal module)

from envayasms.

mfb avatar mfb commented on July 30, 2024

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.

mfb avatar mfb commented on July 30, 2024

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.

youngj avatar youngj commented on July 30, 2024

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.

mfb avatar mfb commented on July 30, 2024

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.

youngj avatar youngj commented on July 30, 2024

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.

youngj avatar youngj commented on July 30, 2024

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.

youngj avatar youngj commented on July 30, 2024

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.

regaladys avatar regaladys commented on July 30, 2024

Thanks youngj! It actually worked We've been using it for several days now. :)

from envayasms.

youngj avatar youngj commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.