nextcloud / nextcloud/twofactor_gateway

Hide the secret code sent in messages (paranoid mode)

Open Beginner friendly
#861 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
122
Forks
63
Avg merge
3d 17h
Merged PRs (30d)
23

Description

Hi! I am a bit worried about displaying one-time codes in messages of my messengers, so I decided to find out how to hide it.

As I use only Signal as 2FA, I have modified manually /apps/twofactor_gateway/lib/Provider/AProvider.php
by adding:

85 $secret = '||'.$secret.'||';

Next time when I receive a code via Signal I will find it hidden like

Image

In order to view it I have to click it and will see the numbers.

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 in apps/twofactor_gateway/lib/Provider/AProvider.php, around the manually added line 85, and inspect how the secret is assembled before being sent through messaging providers. The work is done when one-time codes are hidden in messages as described while remaining viewable by clicking them.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, security
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.