Bug 326786 - Can't send .ini files
Summary: Can't send .ini files
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: send-file (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-28 13:55 UTC by Alex Fiestas
Modified: 2014-02-06 12:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fiestas 2013-10-28 13:55:16 UTC
For some reason .ini files can't be sent, it does not matter if I select it using the dialog or drag and drop it.

Reproducible: Always
Comment 1 David Edmundson 2013-10-28 14:06:22 UTC
I'm confused.

I was the recipient in Alex's testing - and it seemed very much to match this.
I just tried creating an ini file (I renamed a file to .ini) and transferred it using my local jabber server and it worked perfectly.

I'd like someone else to check.
Comment 2 David Edmundson 2013-11-13 10:31:23 UTC
Confirmed with testing with mck182.

Still makes absolutely no sense though.
Comment 3 David Edmundson 2013-11-13 17:07:02 UTC
According to logs:
 - local program tries to send
 - remote does not get anything
 - local is told remove rejected the FT

Jingle logs attached. It could be Google blocking stuff (which would explain why it worked when I tested)

11/13/13 18:02:29.554960 - [gabble/file-transfer] gabble_ft_manager_handle_request (ft-manager.c:465): File transfer request
11/13/13 18:02:29.555022 - [gabble/file-transfer] gabble_ft_manager_handle_request (ft-manager.c:581): Requested outgoing channel with contact: martin.klapetek@gmail.com
11/13/13 18:02:29.555156 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0xa44f10:presences-updated with context 0xb4ff80
11/13/13 18:02:29.555210 - [gabble/file-transfer] gabble_file_transfer_channel_constructed (ft-channel.c:443): New FT channel created: /org/freedesktop/Telepathy/Connection/gabble/jabber/david_40davidedmundson_2eco_2euk_2fkde_2dtelepathy_2d657662/FileTransferChannel/0xa2d4e0 (contact: martin.klapetek@gmail.com, initiator: david@davidedmundson.co.uk, file: "address.ini", size: 22)
11/13/13 18:02:29.555293 - [gabble/file-transfer] offer_gtalk_file_transfer (ft-channel.c:1344): Offering Gtalk file transfer to martin.klapetek@gmail.com/kde-telepa2A77BD86
11/13/13 18:02:29.555334 - [gabble/share] gtalk_file_collection_init (gtalk-file-collection.c:212): GTalk file collection init called
11/13/13 18:02:29.555486 - [gabble/share] gabble_jingle_share_init (jingle-share.c:153): jingle share init called
11/13/13 18:02:29.555589 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0x10a8520:notify::state with context 0x112b040
11/13/13 18:02:29.555641 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0x10a8520:terminated with context 0x114e740
11/13/13 18:02:29.555701 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0xa561e0:new-share-channel with context 0x102f300
11/13/13 18:02:29.555757 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0xa561e0:completed with context 0xb927a0
11/13/13 18:02:29.555867 - [gabble/share] produce_description (jingle-share.c:454): produce description called
11/13/13 18:02:29.556169 - [wocky] _write_node_tree: Serializing tree:
* iq xmlns='jabber:client' type='set' to='martin.klapetek@gmail.com/kde-telepa2A77BD86' id='12763556130'
    * session xmlns='http://www.google.com/session' initiator='david@davidedmundson.co.uk/kde-telepaFDF02839' id='1025836326' type='initiate'
        * description xmlns='http://www.google.com/session/share'
            * manifest
                * file size='22'
                    * name
                        "address.ini"
            * protocol
                * http
                    * url name='source-path'
                        "/temporary/1b2b92f5-4546-4c05-a73f-b16f72b98f05/"
                    * url name='preview-path'
                        "/temporary/e8215086-f63c-4835-a4b6-dadc77da99dd/"
        * transport xmlns='http://www.google.com/transport/p2p'
11/13/13 18:02:29.556327 - [gabble/share] jingle_session_state_changed_cb (gtalk-file-collection.c:420): called
11/13/13 18:02:29.556369 - [gabble/file-transfer] gabble_file_transfer_channel_gtalk_file_collection_state_changed (ft-channel.c:1278): gtalk ft state changed to 0
11/13/13 18:02:29.556476 - [gabble/jid] gabble_signal_connect_weak (util.c:666): connecting to 0xa2d4e0:closed with context 0x102f260
11/13/13 18:02:29.756895 - [wocky] _end_element_ns: Received stanza
* iq xmlns='jabber:client' type='error' to='david@davidedmundson.co.uk/kde-telepaFDF02839' id='12763556130' from='martin.klapetek@gmail.com/kde-telepa2A77BD86'
    * session xmlns='http://www.google.com/session' initiator='david@davidedmundson.co.uk/kde-telepaFDF02839' id='1025836326' type='initiate'
        * description xmlns='http://www.google.com/session/share'
            * manifest
                * file size='22'
                    * name
                        "address.ini"
            * protocol
                * http
                    * url name='source-path'
                        "/temporary/1b2b92f5-4546-4c05-a73f-b16f72b98f05/"
                    * url name='preview-path'
                        "/temporary/e8215086-f63c-4835-a4b6-dadc77da99dd/"
        * transport xmlns='http://www.google.com/transport/p2p'
    * error code='405' type='cancel'
        * not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
11/13/13 18:02:29.757064 - [gabble/share] jingle_session_state_changed_cb (gtalk-file-collection.c:420): called
11/13/13 18:02:29.757195 - [gabble/file-transfer] gabble_file_transfer_channel_gtalk_file_collection_state_changed (ft-channel.c:1278): gtalk ft state changed to 3
11/13/13 18:02:29.757282 - [gabble/file-transfer] close_session_and_transport (ft-channel.c:888): Closing session and transport
11/13/13 18:02:29.757328 - [gabble/share] gtalk_file_collection_terminate (gtalk-file-collection.c:1668): called
11/13/13 18:02:29.757388 - [gabble/file-transfer] gabble_file_transfer_channel_gtalk_file_collection_state_changed (ft-channel.c:1278): gtalk ft state changed to 3
11/13/13 18:02:29.757430 - [gabble/file-transfer] close_session_and_transport (ft-channel.c:888): Closing session and transport
11/13/13 18:02:29.757468 - [gabble/share] gtalk_file_collection_terminate (gtalk-file-collection.c:1668): called
11/13/13 18:02:29.757507 - [gabble/share] gtalk_file_collection_dispose (gtalk-file-collection.c:246): dispose called
11/13/13 18:02:29.757553 - [gabble/jid] user_data_destroyed_cb (util.c:635): user_data for 0x112b040 destroyed; disconnecting
11/13/13 18:02:29.757596 - [gabble/jid] user_data_destroyed_cb (util.c:635): user_data for 0x114e740 destroyed; disconnecting
11/13/13 18:02:29.757639 - [gabble/jid] user_data_destroyed_cb (util.c:635): user_data for 0x102f300 destroyed; disconnecting
11/13/13 18:02:29.757682 - [gabble/jid] user_data_destroyed_cb (util.c:635): user_data for 0xb927a0 destroyed; disconnecting
11/13/13 18:02:29.757734 - [gabble/share] gabble_jingle_share_dispose (jingle-share.c:169): dispose called
11/13/13 18:03:01.558717 - [wocky] _end_element_ns: Received stanza
Comment 4 David Edmundson 2014-02-03 11:55:17 UTC
We found the cause of this:
Google blocks (silently) the sending of any file that ends in .exe or .ini

When sending a file with this extension we want to rename the file the other person receives.

It should be possible to do this by changing the suggested file name http://telepathy.freedesktop.org/doc/telepathy-qt/a00231.html

in ktp-common-internals/KTp/actions.cpp startFileTransfer
Comment 5 Daniel Vrátil 2014-02-06 12:32:36 UTC
Git commit f661897486d989410ef7d0d65d6246f2ec9b6639 by Dan Vrátil, on behalf of Jan Stourac.
Committed on 06/02/2014 at 12:30.
Pushed by dvratil into branch 'master'.

Fix for sending ini and exe files using Google Talk account

Each file transfer is checked for using Google Talk and forbidden extensions.
In that case, "_" character is appended to suggested file name. For all other
cases transfer process remains the same.

REVIEW: 115463
FIXED-IN: 0.8.0

M  +33   -2    KTp/actions.cpp
M  +8    -2    data/ktelepathy.notifyrc

http://commits.kde.org/telepathy-common-internals/f661897486d989410ef7d0d65d6246f2ec9b6639