Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attached files disappears #1603

Closed
adrianalvpa opened this issue Dec 19, 2016 · 2 comments
Closed

Attached files disappears #1603

adrianalvpa opened this issue Dec 19, 2016 · 2 comments
Labels
Milestone

Comments

@adrianalvpa
Copy link

Steps to reproduce

  1. SO: Ubuntu 16.04, Teampass: 2.1.26-final
  2. Create two users with same profile and roles, upload a file from one of user. See the file with the uploader user and logout.
  3. After see the file with the second user, the file disappears. The file desappears from server too (/var/www/html/teampass/upload)

Expected behaviour

Normal use, the file has to be there (teampass and server).

Actual behaviour

After see the file with the second user, the file disappears. The file desappears from server too (/var/www/html/teampass/upload)

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache2

Database: MySQL

PHP version: php7

Teampass version: 2.1.26-final (we have tried with latest versions too)

Updated from an older Teampass or fresh install: Fresh install

Client configuration

Browser: Chrome and Firefox

Operating system:

Logs

Web server error log

When file was deleted by de system, one user try to erase the item atached file and PHP generate next error:

[18-Dec-2016 22:45:36 UTC] PHP Notice:  Undefined variable: dataItem in /var/www/html/teampass/sources/items.queries.php on line 2318
@nilsteampassnet
Copy link
Owner

Yes you are right.

It is corrected in 2.1.27

You can manually do the change by do this.

  • open file items.load.php
  • find and replace
                    open: function( event, ui ) {
                        // delete created file
                        $.post(
                            "sources/items.queries.php",
                            {
                                type        : "delete_file",
                                file_suffix : data.file_suffix,
                                uri         : uri,
                                key         : "<?php echo $_SESSION['key'];?>"
                            },
                            function(data) {

                            }
                        );
                    }

by

                    open: function( event, ui ) {
                        // nothing to do
                    }

@nilsteampassnet nilsteampassnet added this to the 2.1.27 milestone Dec 24, 2016
nilsteampassnet added a commit that referenced this issue Dec 24, 2016
Fix for #1601, #1603
@nilsteampassnet
Copy link
Owner

Corrected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants