Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
parlote-facil
Validations
55efe132
Valider
55efe132
rédigé
il y a 13 ans
par
danielgrippi
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
corrected authorizations_controller_spec to assert on response codes
parent
144ac825
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
app/controllers/authorizations_controller.rb
+1
-1
1 ajout, 1 suppression
app/controllers/authorizations_controller.rb
spec/controllers/authorizations_controller_spec.rb
+5
-5
5 ajouts, 5 suppressions
spec/controllers/authorizations_controller_spec.rb
avec
6 ajouts
et
6 suppressions
app/controllers/authorizations_controller.rb
+
1
−
1
Voir le fichier @
55efe132
...
...
@@ -39,7 +39,7 @@ class AuthorizationsController < ApplicationController
message
=
verify
(
signed_string
,
Base64
.
decode64
(
params
[
:signature
]),
public_key
,
manifest
)
if
not
(
message
==
'ok'
)
render
:text
=>
message
,
:status
=>
403
elsif
manifest
[
"application_base_url"
].
match
(
/^https?:\/\/(localhost
:\d+
|chubbi\.es|www\.cubbi\.es|cubbi\.es)\/$/
).
nil?
elsif
manifest
[
"application_base_url"
].
match
(
/^https?:\/\/(localhost|chubbi\.es|www\.cubbi\.es|cubbi\.es)
(:\d+)?
\/$/
).
nil?
# This will only be temporary (less than a month) while we iron out the kinks in Diaspora Connect. Essentially,
# whatever we release people will try to work off of and it sucks to build things on top of non-stable things.
# We also started writing a gem that we'll release (around the same time) that makes becoming a Diaspora enabled
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
spec/controllers/authorizations_controller_spec.rb
+
5
−
5
Voir le fichier @
55efe132
...
...
@@ -65,28 +65,28 @@ describe AuthorizationsController do
prepare_manifest
(
"http://chubbi.es/"
)
@controller
.
stub!
(
:verify
).
and_return
(
'ok'
)
post
:token
,
@params_hash
response
.
b
od
y
.
blank?
.
should
be_false
response
.
c
od
e
.
should
==
"200"
end
it
'renders something for cubbies '
do
prepare_manifest
(
"http://cubbi.es/"
)
@controller
.
stub!
(
:verify
).
and_return
(
'ok'
)
post
:token
,
@params_hash
response
.
b
od
y
.
blank?
.
should
be_false
response
.
c
od
e
.
should
==
"200"
end
it
'renders something for cubbies '
do
prepare_manifest
(
"https://www.cubbi.es/"
)
prepare_manifest
(
"https://www.cubbi.es
:443
/"
)
@controller
.
stub!
(
:verify
).
and_return
(
'ok'
)
post
:token
,
@params_hash
response
.
b
od
y
.
blank?
.
should
be_false
response
.
c
od
e
.
should
==
"200"
end
it
'renders something for localhost'
do
prepare_manifest
(
"http://localhost:3423/"
)
@controller
.
stub!
(
:verify
).
and_return
(
'ok'
)
post
:token
,
@params_hash
response
.
b
od
y
.
blank?
.
should
be_false
response
.
c
od
e
.
should
==
"200"
end
it
'renders nothing for myspace'
do
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter