TeamAmaze / TeamAmaze/AmazeFileManager

`IllegalArgumentException` on `PasswordUtil#aesDecryptPassword`

Open
#3,602 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Cryptography From-Email Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

what am I doing wrong?

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.8.2
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 6.0 - 23
  • Device: TB3-850F
  • Model: Lenovo TB3-850F
  • Product: LenovoTB3-850F
Crash log

java.lang.IllegalArgumentException: bad base-64
at android.util.Base64.decode(Base64.java:161)
at android.util.Base64.decode(Base64.java:136)
at android.util.Base64.decode(Base64.java:118)
at
com.amaze.filemanager.utils.PasswordUtil.aesDecryptPassword(PasswordUtil.kt:65)
at
com.amaze.filemanager.utils.PasswordUtil.decryptPassword(PasswordUtil.kt:124)
at
com.amaze.filemanager.filesystem.files.EncryptDecryptUtils.decryptFile(EncryptDecryptUtils.java:195)
at
com.amaze.filemanager.ui.ItemPopupMenu.onMenuItemClick(ItemPopupMenu.java:227)
at android.widget.PopupMenu.onMenuItemSelected(PopupMenu.java:252)
at
com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:766)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
at
com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:909)
at
com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:899)
at
com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:205)
at android.widget.AdapterView.performItemClick(AdapterView.java:315)
at android.widget.AbsListView.performItemClick(AbsListView.java:1193)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3231)
at android.widget.AbsListView.onTouchUp(AbsListView.java:4218)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3924)
at android.view.View.dispatchTouchEvent(View.java:9415)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2660)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2304)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318)
at
android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2028)
at android.view.View.dispatchPointerEvent(View.java:9646)
at
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4743)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4601)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4106)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4159)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4125)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4271)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4133)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4328)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4106)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4159)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4125)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4133)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4106)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6560)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6534)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6477)
at
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6732)
at
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:328)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PasswordUtil.kt at lines 65 and 124, then trace the call from EncryptDecryptUtils.java:195 and ItemPopupMenu.java:227. Determine why an invalid Base64 value reaches aesDecryptPassword and what the expected behavior is for this failure. Done should be verified by confirming the decryption flow no longer crashes for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.