Closed Bug 380449 Opened 17 years ago Closed 17 years ago

potential data loss on export of LAST_MODIFIED, DATE_ADDED and ICON_URI attributes (nsPlacesImportExportService.cpp)

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 alpha6

People

(Reporter: moco, Assigned: moco)

References

Details

potential data loss on export of folderIds, itemIds, and favicon specs (nsPlacesImportExportService.cpp)

this will also be a concern once import/export of date added and last modified are implemented (see bug #371827)

the external api (nsStringAPI.h) does not have a 64-bit appendint

I think we need to use the internal string api.

from my windows build:

nsPlacesImportExportService.cpp
c:/builds/trunk-no-places/mozilla/browser/components/places/src/nsPlacesImportEx
portService.cpp(1095) : warning C4244: 'argument' : conversion from 'PRTime' to
'int', possible loss of data
c:/builds/trunk-no-places/mozilla/browser/components/places/src/nsPlacesImportEx
portService.cpp(1434) : warning C4244: 'argument' : conversion from 'PRInt64' to
 'int', possible loss of data
c:/builds/trunk-no-places/mozilla/browser/components/places/src/nsPlacesImportEx
portService.cpp(1574) : warning C4244: 'argument' : conversion from 'PRInt64' to
 'int', possible loss of data
c:/builds/trunk-no-places/mozilla/browser/components/places/src/nsPlacesImportEx
portService.cpp(1693) : warning C4244: 'argument' : conversion from 'PRInt64' to
 'int', possible loss of data
for a real world instance of this problem, see bookmarks.html:

ICON_URI="http://www.mozilla.org/2005/made-up-favicon/0--547403822

the code that is generating that is:

    // make up favicon URL
    nsCAutoString faviconSpec;
    faviconSpec.AssignLiteral("http://www.mozilla.org/2005/made-up-favicon/");
    faviconSpec.AppendInt(serialNumber);
    faviconSpec.AppendLiteral("-");
    faviconSpec.AppendInt(PR_Now()); // casting from PRInt64 -> PRInt32, data loss, fix me
we are going to stop exporting item ids and folder ids to bookmarks.html (see bug #383840), but we will still have the problem with favicon icon specs
Depends on: 383840
accepting, I have a fix for this in bug #383840
Assignee: nobody → sspitzer
Target Milestone: --- → Firefox 3 alpha6
updating summary
Status: NEW → ASSIGNED
Summary: potential data loss on export of folderIds, itemIds, and favicon specs (nsPlacesImportExportService.cpp) → potential data loss on export of LAST_MODIFIED, DATE_ADDED and ICON_URI attributes (nsPlacesImportExportService.cpp)
fixed with the fix for bug #383840
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.